Question: Create a program with the following functions (remember to define the functions before calling them): 1. Fahrenheit to Celsius - fahr2Celsius(fahr_temp) a. Argument -

Create a program with the following functions (remember to define the functions  
 
 

Program steps: 1. Input and processing: a. Prompt the user for the type of temperature conversion to make and determine which

2. Output: a. Fahrenheit to celsius: The Fahrenheit temperature and the Celsius temperature must be formatted with one decima

b. Celsius to fahrenheit: The Celsius temperature and the Fahrenheit temperature must be formatted with one decimal place usi 


 

Create a program with the following functions (remember to define the functions before calling them): 1. Fahrenheit to Celsius - fahr2Celsius(fahr_temp) a. Argument - temperature in Fahrenheit b. Return value - temperature in Celsius Formula: (Fahrenheit - 32) * 5/9 2. Celsius to Fahrenheit - cels2Fahrenheit(cels_temp) a. Argument - temperature in Celsius b. Return value - temperature in Fahrenheit Formula: (9/5) * Celsius temp + 32. Program steps: 1. Input and processing: a. Prompt the user for the type of temperature conversion to make and determine which function to call: C (fahrenheit to celsius), F (celsius to fahrenheit) Note: See the screen shots below for examples of program input and output i. For an input of C (fahrenheit to celsius) 1. Prompt the user for the fahrenheit temperature to convert 2. Call the fahr2Celsius function passing as an argument the fahrenheit temperature entered ii. For an input of F (celsius to fahrenheit) 1. Prompt the user for the celsius temperature to convert 2. Call the cels2Fahrenheit function passing as an argument the celsius temperature entered b. Store the converted temperature value returned from the called function (use in step 2 below) 2. Output: a. Fahrenheit to celsius: The Fahrenheit temperature and the Celsius temperature must be formatted with one decimal place using one of the string formatting techniques, str.format() or f-string, and displayed like the screenshots below. Convert temperatures between fahrenheit and celsius Enter C for fahrenheit to Celsius, Enter F for celsius to fahrenheit: C Enter the Fahrenheit temperature: 68 68.0 degrees Fahrenheit converted to celsius is: 20.0 degrees Celsius. Convert temperatures between fahrenheit and celsius Enter C for fahrenheit to Celsius, Enter F for celsius to fahrenheit: C Enter the Fahrenheit temperature: 72.9 72.9 degrees Fahrenheit converted to celsius is: 22.7 degrees Celsius. b. Celsius to fahrenheit: The Celsius temperature and the Fahrenheit temperature must be formatted with one decimal place using one of the string formatting techniques, str.format() or f-string, and displayed like the screenshots below. Convert temperatures between fahrenheit and celsius Enter C for fahrenheit to Celsius, Enter F for celsius to fahrenheit: F Enter the Celsius temperature to convert: 2e 20.0 degrees celsius converted to fahrenheit is: 68.0 degrees fahrenheit. Convert temperatures between fahrenheit and celsius Enter C for fahrenheit to Celsius, Enter F for celsius to fahrenheit: F Enter the Celsius temperature to convert: 23.8 23.8 degrees celsius converted to fahrenheit is: 74.8 degrees fahrenheit.

Step by Step Solution

3.40 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Code def tofehrctemp return 18ctemp32 def tocelsftem... View full answer

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 Computer Engineering Questions!