Commit 12e94f66 by BellCodeEditor

save project

parent 1fe2679d
Showing with 4 additions and 1 deletions
import random import random
a=input("请输入(石头/剪刀/布)") a=input()
print("玩家出拳:"+a) print("玩家出拳:"+a)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
while not a in list:
print("输入错误")
a=input()
computer=random.choice(list) computer=random.choice(list)
print("计算机出拳:"+computer) print("计算机出拳:"+computer)
if a==computer: if a==computer:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment