python练习-easygui-温度转
2023-01-31 01:01:32
python
import easygui
easygui.msgbox('this program converts fahrenheit to celsius')
t=easygui.enterbox('type the T temperature in fahrenheit:')
f=float(t)
c=(f-32)*5.0/9
#'\n'是换行
easygui.msgbox('this is'+ str(c)+ '\n'+'degrees celsius.')
相关文章