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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!