Computers and Technology
Computers and Technology, 18.06.2021 01:50, anthonysf

CMSY 156 - Lab 4 Please submit .py files as well screenshot of the outputCreate 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 CelsiusFormula: (Fahrenheit – 32) * 5 / 9 2.Celsius to Fahrenheit – cels2Fahrenheit(cels_temp)a. Argument – temperature in Celsiusb. 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 outputi. 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 enteredii. For an input of F (celsius to fahrenheit)1.Prompt the user for the celsius temperature to convert2.Call the cels2Fahrenheit function passing as an argument the celsius temperature enteredb. Store the converted temperature value returned from the called function (use in step 2 below) CMSY 156 - Lab 4 Please submit .py files as well screenshot of the output2.Output:a. Fahrenheit to celsius: The Fahrenheit temperature and the Celsius temperaturemust be formatted with one decimal place using one of the string formatting techniques, str. format() or f-string, and displayed like the screenshots below. 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.
CMSY 156 - Lab 4 Please submit .py files as well screenshot of the outputRubric: Source code documented using comments (5) Correct request for input values (3) Input on same line as the prompt (1) Correct use of if statements (4) Correct function definitions (10) Correct function calls (5) Correct calculations(5) Correct formatting of output (5) Source code has adequate white space/readability (3) Use given test data (2) program screenshots submitted (2) program executes without error (5)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:00, leo4687
Complete the sentence about a presentation delivery method
Answers: 2
image
Computers and Technology, 25.06.2019 04:30, Teedollasign
Which relativos possible when two tables share the same primary key? a.) one-to-one b.) one-to-many c.) many-to-one d.) many-to-many
Answers: 2
image
Computers and Technology, 25.06.2019 05:10, ethanmel21
Assume that two parallel arrays have been declared and initialized: healthoption an array of type char that contains letter codes for different healthcare options and annual cost an array of type int. the i-th element of annual cost indicates the annual cost of the i-th element of healthoption. in addition, there is an char variable, best2.write the code necessary to assign to best2 the health option with the lower annual cost, considering only the first two healthcare options. thus, if the values of healthoption are 'b', 'q', 'w', 'z' and the values of annualcost are 8430, 9400, 7050, 6400 your code would assign 'b' to best2 because 8430 is less than 9400 and is associated with 'b' in the parallel array. (we ignore 'w' and 'z' because we are considering only the first two options.)
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, sierranowe2003
7. test average and grade write a program that asks the user to enter five test scores. the program should display a letter grade for each score and the average test score. write the following methods in the program: calcaverage: this method should accept five test scores as arguments and return the average of the scores. determinegrade: this method should accept a test score as an argument and return a letter grade for the score, based on the following grading scale: score letter grade 90-100 a 80-89 b 70-79 c 60-69 d below 60 f
Answers: 1
Do you know the correct answer?
CMSY 156 - Lab 4 Please submit .py files as well screenshot of the outputCreate a program with the f...

Questions in other subjects:

Konu
Mathematics, 26.08.2020 19:01
Konu
Mathematics, 26.08.2020 19:01