Chinaunix首页 | 论坛 | 博客
  • 博客访问: 82721
  • 博文数量: 29
  • 博客积分: 815
  • 博客等级: 军士长
  • 技术积分: 395
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-01 12:42
文章分类

全部博文(29)

文章存档

2016年(4)

2012年(24)

2011年(1)

分类: Python/Ruby

2016-01-29 14:18:31

第一天
文章来源于廖雪峰的网站,感谢
第一个py脚本 ,进行数值计算 
当脚本里面内容为 print(100+200+300)   运行脚本显示为600   
当脚本里面内容为print('100+200+300')   运行脚本显示为100+200+300   
结论:双括号里面的单引号把数值集成了一个字符串,运行结果显示的是该字符串的内容 ,后面有提到

number=input ('this is a lication computation,please press enter key and then input the number of a and b ')
a = int(input('a= '))  
b = int(input('b= '))
print('Ok ,the values is ',a * b)

思考:怎么来根据直接加减乘除来得出数据,这个只是单个的乘法运算。
阅读(1053) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~