Intro To Python 3: | Fahrenheit to Celsius converter | Input() , float() , int()

Опубликовано: 24 Сентябрь 2020
на канале: easy Computer stuff
28
1

Welcome to our Channel...
please comment if you have any questions.


The code...

F1 = float(input('Enter F Degree...\n')) # variable named F1 to intake a float value from the user

C1 = (F1 - 32) * 5/9 # the equation from F to C



print('F to C ', F1 ,' = is %.2f C' %C1) # print the result and display a message 'F To C is....' %.2f is
#to show 2 decimal places after the point.




print('___________________________________________________________') # a sperator

C2 = float(input('Enter C Degree...\n')) # C2 intakes C degree

F2 = (C2) * (9/5) +32 # the equation from C to F...

print('C To F' , C2 , ' is = %.2f F' %F2) # print

lets run it...