- 博客(2)
- 收藏
- 关注
原创 python中赋值运算
a = 21 b = 10 c = 0 c = a + b print("Line4 - Value of c is ",c) c += a print("Line6 - Value of c is ",c) c *= a print("Line8 - Value of c is ",c) c /= a print("Line10 - Value of c is ",c) c = 2 结果 Line4 - Value of c is 31 Line6 - Value of c is 52 Li..
2021-12-04 01:26:59 667
原创 python中标准算数运算符实
python中标准算数运算符实例 #coding=UTF-8 #标准算数运算符实例 print (''' Pthon中的标准运算符:+、-、*、/、//、%、** 标准算术运算符代表的相关操作:加、减、乘、除、浮点除法(对结果进行四舍为五入)、取余、乘方运算符 ''') add=3+5 print("%d + %d = %d" %(3,5,add)) sub=5-2 print("%d - %d = %d" %(5,2,sub)) mu1=5 * 2 print("%d * %d = %d" %(5,2,m
2021-12-04 01:16:34 865
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人