python 学习之路-day2

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

####引入变量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)

posted @ 2016-06-21 16:54  认真想想  阅读(93)  评论(0编辑  收藏  举报