Question: Write a Python function named convert _ temperature that converts a temperature from Celsius to Fahrenheit and vice versa. The function should take two arguments:

Write a Python function named "convert_temperature" that converts a temperature from Celsius to Fahrenheit and vice versa. The function should take two arguments: the temperature value and the scale to convert to (' C ' for Celsius or ' F ' for Fahrenheit). Implement the function such that convert_temperature(100,'C') returns 37.78 and convert_temperature(0,'F') returns 32.0. Include test cases to verify your function works correctly.
Write a Python function named "convert _

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 Programming Questions!