File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,23 +53,28 @@ def my_menu():
5353 if option == ' a' or option == ' A' :
5454 print (" \n\n You are converting Miles to Km" )
5555 n = float (input (" What is amount of miles you wish to convert to km?: " ))
56- print (milesToKm(n))
56+ s = milesToKm(n)
57+ print (" %.2f " % s)
5758 elif option == ' b' or option == ' B' :
5859 print (" \n\n You are converting Gallons to Liters" )
5960 g = float (input (" \n What is amount of gallons you wish to convert to liters?: " ))
60- print (gallonsToLiters(g))
61+ b= gallonsToLiters(g)
62+ print (" %.2f " % b)
6163 elif option == ' c' or option == ' C' :
6264 print (" \n\n You are converting Pounds to Kg" )
6365 l = float (input (" \n What is amount of lb you wish to convert to kg?: " ))
64- print (lbsToKg(l))
66+ c= lbsToKg(l)
67+ print (" %.2f " % c)
6568 elif option == ' D' or option == ' D' :
6669 print (" \n\n You are converting Inches to Cm" )
67- c = float (input (" \n What is amount of Inches you wish to convert to Cm?: " ))
68- print (inchesToCm(c))
70+ d = float (input (" \n What is amount of Inches you wish to convert to Cm?: " ))
71+ e = inchesToCm(d)
72+ print (" %.2f " % e)
6973 elif option == ' e' or option == ' E' :
7074 print (" \n\n You are converting Fahrenheight To Celsius" )
7175 cels = int (input (" \n What is the temperature in Fahrenheight you wish to convert to Celsius?: " ))
72- print (fahrenToCels(cels))
76+ h = fahrenToCels(cels)
77+ print (" %.2f " % h)
7378 elif ValueError :
7479 print (" That was a wrong choice" )
7580 my_menu()
@@ -86,4 +91,5 @@ def inchesToCm(inches: float) -> float:
8691 return inches* 2.54
8792def fahrenToCels (fahren : float ) -> float :
8893 return ((fahren- 32 )/ 1.8 )
94+ my_menu()
8995```
You can’t perform that action at this time.
0 commit comments