Quick actions

cmd+k|ctrl+k

Navigation

Languages

2026012901

Snippet info

Language

Python

Visibility

public

Author

shaoronghong15

Created

2026-01-29T05:34:44.582155Z

Updated

2026-01-29T06:04:20.491932Z

x = input('Please select 1 (Celsius) or 2 (Fahrenheit): ')
print(x)
y = input('Please input the temperature: ')
print(y)
y0 = int(y)
if x == '1':
    print('Celsius {} degree = Fahrenheit {} degree'.format(y, 9*y0/5+32))
elif x == '2':
    print('Fahrenheit {} degree = Celsius {} degree'.format(y, 5*(y0-32)/9))
else:
    print('select error')
INFO