Quick actions

cmd+k|ctrl+k

Navigation

Languages

Temperature

Snippet info

Language

Python

Visibility

public

Author

chmyk-0701

Created

2026-05-04T06:57:36.324347Z

Updated

2026-05-07T11:16:58.304704Z

a = int(input('Pleas select 1 (Celsius) or 2 (Fahrenheit):'))
temperature= int(input ('Please input the temparture:'))

if a==1:
    f_temperature = 9/5*temperature +32
    print ('Celsius', temperature,'degree = Fahrenheit', f_temperature ,'degree')
else:
    c_temperature = 5/9*(temperature -32)
    print( 'Fahrenheit' , temperature,'degree = Celsius' ,c_temperature ,'degree')
INFO