Question
Your script must print a Celsius to Fahrenheit conversion table ranging from 0 to 10 degrees Celsius and a Fahrenheit to Celsius conversion table ranging
Your script must print a Celsius to Fahrenheit conversion table ranging from 0 to 10 degrees Celsius and a Fahrenheit to Celsius conversion table ranging from 32 to 40 degrees Fahrenheit. The tables should have the same format as in homework 5. The script must have four functions
celsius_to_fahrenheit
print_celsius_to_fahrenheit_conversion_table
fahrenheit_to_celsius
print_farherheit_to_celsius_conversion_table
celsius_to_fahrenheit must take as its parameter the Celsius temperature and return the corresponding Fahrenheit temperature. print_celsius_to_fahrenheit_conversion_table must take two arguments, the minimum and maximum Celsius temperature in the table. This function will actually print the Celsius to Fahrenheit conversion table. fahrenheit_to_celsius must take as its parameter the Fahrenheit temperature and return the corresponding Celsius temperature. print_farherheit_to_celsius_conversion_table must take two arguments, the minimum and maximum Fahrenheit temperature in the table. This function will actually print the Fahrenheit to Celsius conversion table.
Testing
Your output should look like this
python3 hw7.py Celsius Fahrenheit ------------------ 0 32 1 34 2 36 3 37 4 39 5 41 6 43 7 45 8 46 9 48 10 50 Fahrenheit Celsius ----------------------- 32 0 33 1 34 1 35 2 36 2 37 3 38 3 39 4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started