There is one deliverable for this assignment
def print_table_line(celsius):This function prints one line in the table.
0 32In order to do this, the function must first convert the Celsius temperature into a Fahrenheit value.
def print_conversion_table(min, max):This function does four things
for
loopfor
loop variable must range from the minimum Celsius temperature to the
maximum Celsius temperature.
min = int(input("Please enter the starting temperature for the table: ")) max = int(input("Please enter the ending temperature for the table: ")) print() print_conversion_table(min, max)
print
statement that simply prints the
value of the celsius parameter. print_table_line(30)Run the code and fix any errors.
print
statement so it print both the celsius
and fahrenheit values. print
statement at the bottom of the script. print
statement that prints the labels "Celsius" and "Fahrenheit". print
statement that prints a line of dashes, -. for
loop will a loop variable that will run from the minimum to the maximum
values given by the parameters. for
loop add a print
statement that prints the loop variable. print
statement under the for
loop.print
statement in print_table_line
so the Celsius and Fahrenheit values line up with the labels printed by
print_conversion_table. python3 hw6.pyPlease enter the starting temperature for the table: 10 Please enter the ending temperature for the table: 15 Celsius Fahrenheit ------------------ 10 50 11 52 12 54 13 55 14 57 15 59The text in blue is what you enter at the command line.
cd it116
cd hw
mkdir hw6
ls
cd it116/hw/hw6
python3 ex6.py
python3 hw6.pyPlease enter the starting temperature for the table: 10 Please enter the ending temperature for the table: 15 Celsius Fahrenheit ------------------ 10 50 11 52 12 54 13 55 14 57 15 59The text in blue is what you enter at the command line.
min = int(input("Please enter the starting temperature for the table: ")) max = int(input("Please enter the ending temperature for the table: ")) print() print_conversion_table(min, max)Your output should look something like this