- 博客(2)
- 收藏
- 关注
原创 python基础数据类型
算数运算符:+ - * % // / ** in not in 布尔值:True真 False假 if True: pass while True: pass V==1 print(V) 比较运算符:== > < >= <== != <> 赋值运算符: = += -= *= /= %= **= //= #数据类型:具有自己的特殊的功能 数字int: ‘’’ num=‘a’v=int(num,base=16) #把a转化
2020-08-23 22:41:54 139
原创 python的基础练习题
python基础练习 #使用while循环输入1,2,3,4,5,6,7,8,9,10 ''' n=1 while n<=10: print(n,end=',') n+=1 #求1-100的所有数的和 i=1 a=0 while i<=100: a+=i i+=1 print(a) ''' ''' #输出1-100内的所有奇数 a=1 while a<=100: if a%2!=0: print(a)
2020-08-20 15:54:45 119
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人