Python-数字

#Python中可以执行加+、减-、乘*、除/运算,同时使用两个乘号**表示乘方运算。
#浮点:Python将带小数点的数字都成为浮点运算
#使用str()避免类型错误
#如下变量age是一个整数,如果不调用函数str(),python会不清楚这个变量是23还是2和3
age= 23
message = "happy " +str(age)+" brithday"
print(message)

猜你喜欢

转载自www.cnblogs.com/AILiu/p/10906841.html