理解数据类型和数学运算

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> a=input('请输入一个数字')
请输入一个数字555
>>> b=input('请输入另一个数字')
请输入另一个数字111
>>> sum1=int(a)+int(b)
>>> print('二数之和:{}'.format(sum1))
二数之和:{}
>>> a=input('请输入摄氏度')
请输入摄氏度88
>>> sum1=int(a)*6/5+21
>>> print('华氏温度:{}'.format(sum1))
华氏温度:{}
>>> 

 

posted @ 2018-04-23 15:23  chenguanxun  阅读(178)  评论(0)    收藏  举报