首页 > 编程语言 > 详细

python 学习之路-day2

时间:2016-06-21 17:23:00      阅读:277      评论:0      收藏:0      [点我收藏+]

第二天找到点信心,这个代码居然看懂了呢。

####引入变量name根据提示输入你的名字

name = input(‘please input your name :‘)
print (‘hello!‘+(name))

 

####演示输出函数的实例

print (‘a‘,‘b‘,‘c‘)
print (‘a‘,‘b‘,‘c‘,sep=‘,‘)
print (‘a‘,‘b‘,‘c‘,end=‘;‘)
print (‘a‘,‘b‘,‘c‘)

####python的四则运算

>>>3*5/2+4*2

>>>2**6+6**6

####math模块的基本函数

import math

x = 2 

####求正弦值

math.sin(x)

####求平方根

mah.sqrt(x)

####求2的16次方

math.pow(2,16)

python 学习之路-day2

原文:http://www.cnblogs.com/zhanggs/p/5604225.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!