Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python The second assignment is to demonstrate an initial use of variables. You can write two programs that convert from Fahrenheit to Celsius, and from

Python image text in transcribed
The second assignment is to demonstrate an initial use of variables. You can write two programs that convert from Fahrenheit to Celsius, and from Celsius to Fahrenheit. Your version must handle fractions of a degree. The equation for converting F to C is: (FK)5/9 The equation for converting C to F is: C9/5+K Where K is a named constant and the value is 32 . - Create the files with the yourfirstnameF2C and second one yourfirstnameC2F (4) - First one yourfirstnameF2C converts from Fahrenheit to Celsius and second one yourfirstnameC2F converts from Celsius to Fahrenheit (4) - Both the programs should be written inside an indented block in def main0: (5) - The programs outputs a pleasant greeting that introduces the program (e.g. "I will convert temperatures for you"). (5) - In each program the user should be able to input the temperature to convert with the aid of an useful message. (5) - K should be declared as a named constant and assigned the value of 32.(5) - In the C2F program the input Celsius should be received in a variable called yourfirstnameCels. (3) - In the F2C program the input Farenheit should be received in a variable called yourfirstnameFahr. (3) - In the C2F program the output Farenheit should be computed in a variable called yourlastnameFahr. (3) - In the F2C program the output Celsius should be computed in a variable called yourlastnameCels. (3) - The programs outputs a meaningful message about the conversion along with the result.(5) - The programs should compile and compute the correct result (35) - The programs handles "decimal" values like 98.6 or 37.2. - The programs should round off the calculated values to two decimals using the print (f...) (5) - You can zip both files together and submit as one .zip. - Make sure that the zip consists of the .py files. (5) - Please add appropriate Comments including header comments which gives the details of the assignment as specified in Assignment 1 and start with what the program does or purpose of the program is

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How does selection differ from recruitment ?

Answered: 1 week ago