Need help with an assignment involving python code.
MIAMI-DADE COLLEGE
School of Engineering and Technology
COP 1047C - Introduction to Python Programming
Assignment 3
Due On: 06/06/2022
It is the galactic year 62.01. The Cruz Space Synergy Industries. (CSSI) has been very successful. Due to an increase in demand for its CFDSS-X.5 multiple use Cold Fusion Drive Space System (CFDSS), the company had to hire thousands of scientists, engineers, and staff from all over the world. As we all know, not all countries use the same system of measurements. The U.S., Liberia and Burma use the English system, while the rest of the world uses the metric system. In addition, scientists use specific scales for some of their applications. To avoid confusion among team members from different countries, the company has commissioned the development and deployment of conversion applications. Your job is to write a program that interchangeably converts between different temperature scales (Celsius, Fahrenheit and Kelvin).
Your job depends on the success of this application. Therefore, make sure you write clean code and test it thoroughly.
Your program must do the following:
Display the menu below and get user input. Re-display the menu until the user enters 4.
Convert from Celsius
Convert from Fahrenheit
Convert from Kelvin
Quit Program
If the user enters 1, prompt the user to enter 3 numbers that represent temperatures expressed in degree Celsius. The program must then convert the temperatures to degree Fahrenheit and Kelvin and output them in a table as follows:
Celsius
Fahrenheit
Kelvin
-10.00
14.00
263.15
0.00
32.00
273.15
100.00
212.00
373.15
If the user enters 2, prompt the user to enter 3 numbers that represent temperatures expressed in degree Fahrenheit. The program should then convert the temperatures to degree Celsius and Kelvin and output them in a table as follows:
Fahrenheit
Celsius
Kelvin
-10.00
-23.33
249.82
0.00
-17.78
255.37
100.00
37.78
310.93
If the user enters 3, prompt the user to enter 3 numbers that represent temperatures expressed in degree Kelvin. The program should then convert the temperatures to degree Fahrenheit and Celsius and output them in a table as follows:
Kelvin
Fahrenheit
Celsius
0.00
-459.67
-273.15
100.00
-279.67
-173.15
1000.00
1340.33
726.85
If the user enters 4, quit the program.
Needed conversion formulas:
From | To | Formula |
Celsius | Fahrenheit | F = C * (9.0/5.0) + 32 |
Celsius | Kelvin | K = C + 273.15 |
Fahrenheit | Celsius | C = (F – 32) * (5.0/9.0) |
Fahrenheit | Kelvin | K = (F + 459.67) * (5.0 /9.0) |
Kelvin | Fahrenheit | F = K * (9.0/5.0) – 459.67 |
Kelvin | Celsius | C = K – 273.15 |
Your program must comply with the following constraints:
Must declare at least the following 5 functions:
main() #main flow of the program
getMenuSelection() #Displays menu and gets user selection
convertFromCelsius() #From Celsius to the other scales
convertFromFahrenheit() #From Fahrenheit to the other scales
convertFromKelvin() #From Kelvin to the other scales
The main function must look exactly as shown below:
def main():
menuSelection = 0
while True:
menuSelection = getMenuSelection()
if menuSelection == 1:
convertFromCelsius()
elif menuSelection == 2:
convertFromFahrenheit()
elif menuSelection == 3:
convertFromKelvin()
elif menuSelection == 4:
break #Exit Condition
else:
print(“Please enter a number between 1 and 4”)
Submission guidelines: Send your Assignment3.txt file as attachment to my email address [email protected], with the subject Assignment 3.
Note: Don’t forget to include the header at the top of your code.