- 博客(3)
- 收藏
- 关注
原创 Python猜拳小游戏
Python猜拳小游戏 直接上代码 1.这里调用了 random函数,产生随机数 import random player = int(input('请你出拳:1--剪刀;2--石头;3--布:')) print(f'你出的是{player}') cumputer = random.randint(1,3) # 玩家赢 if (player == 1 and cumputer == 3) or (player == 2 and cumputer == 1) or (player == 3 and cumpu
2020-12-22 21:05:31 63
原创 Python九九乘法表
Python九九乘法表 自己写的一小段代码,需要的自取: i = 1 while i <= 9: j = 1 while j <= i: print(f'{j}x{i}={j*i}',end='\t') j += 1 print() i += 1 运算结果: 1x1=1 1x2=2 2x2=4 1x3=3 2x3=6 3x3=9 1x4=4 2x4=8 3x4=12 4x4=16 1x5=5 2x5=10 3x5=15 4x5=2
2020-12-22 20:54:48 116
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人