Question
In Python, write a script, and a function, to obtain ( temp ) and the ( scale ) of the provided temperature. Convert it from
In Python, write a script, and a function, to obtain (temp) and the (scale) of the provided temperature. Convert it from Celsius to Fahrenheit temperatures or vice versa.
The formula from C to F and vice versa is:
Tc = 1.8 * Tf + 32 ,
Tf=(Tc - 32)/1.8
Print the output in the form, dependin on the user input:
'The Celsius temperature of 50.0 degrees is equivalent to 122.0 degrees Fahrenheit'
or
'The Fahrenheit temperature of 122.0 degrees is equivalent to 50.0 degrees Celsius'
Do this twice:
1. As a script.
2. As a function named "Tempchange(temp, scale)" that goes both ways.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started