Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# convert.py # A program to convert Celsius temps to Fahrenheit # by: Susan Computewell def main(): celsius = eval(input(What is the Celsius temperature? ))

# convert.py # A program to convert Celsius temps to Fahrenheit # by: Susan Computewell def main(): celsius = eval(input("What is the Celsius temperature? ")) fahrenheit = 9/5 * celsius + 32 print("The temperature is", fahrenheit, "degrees Fahrenheit.") main() 

2. The algorithm for convert.py is:

Input the temperature in Celsius degree

Calculate to Fahrenheit degree: Fahrenheit = (9/5)*Celsius + 32

Output Fahrenheit degree

3. Open IDLE Shell, then click File -->New File, TYPE convert.py file into IDLE Scripts mode. (right-hand side screenshot as below)

Comments are to explain each line of statements. It's important to help understand this program.

4. Click Run --> Run Module (or just simple click shortcut F5). Respond/interact this program (within the Interactive mode, left-hand side screenshot as below) by typing a number as requested.

See screenshots:

image text in transcribed

5. Point out each identifier (all the names in program), each variable, each expression, assignment, loop.

Modify the convert.py Program?

Programming Excises 1: Modify the convert.py to print an intro.

Programming Excises 3: Modify the convert.py to loop 5 times with different inputs before quitting, name it as: convert_v2.py.

Run it to see what the result 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

Recommended Textbook for

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions

Question

e. What do you know about your ethnic background?

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago