python 经典猜拳游戏,理解随即库与缩进问题
import random b = random.randint(0,2) print(b) #b = int(b) a = input("输入你的数字:") a = int(a) if a > 3: print("数字错误") elif a == b : print("平手了") elif a > b : print("你输了") else: print("你赢了") pass
python 经典猜拳游戏,理解随即库与缩进问题
import random b = random.randint(0,2) print(b) #b = int(b) a = input("输入你的数字:") a = int(a) if a > 3: print("数字错误") elif a == b : print("平手了") elif a > b : print("你输了") else: print("你赢了") pass