Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The cell below includes a function that has been provided for you. After understanding the code in the function, run the cell below (to define
The cell below includes a function that has been provided for you. After understanding the code in the function, run the cell below (to define this function). Then, execute (use) this function to create the following variables under the specified conditions:
- tempA| execute theconvert_tempfunction to convert the temperature 95 degrees Fahrenheit into degrees Celsius
- tempB| executeconvert_tempto convert the temperature 17 degrees Celsius into degrees Fahrenheit
def convert_temp(temp, input_unit='F'):
if input_unit == 'F':
out_temp = (temp - 32) * 5/9
elif input_unit == 'C':
out_temp = (temp * 9/5) + 32
else:
print("Please specify either 'F' or 'C' for input_unit")
return out_temp
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