Commit 0373f47a by BellCodeEditor

save project

parent 80fe9bbd
Showing with 33 additions and 11 deletions
# 玩家出拳b # 玩家出拳b
import random while True:
b=["石头","剪刀","布"] import random
a=input("请输入(石头/剪刀/布)") b=["石头","剪刀","布"]
print("玩家:"+a) a=input("请输入(石头/剪刀/布)")
c=random.choice(b) print("玩家:"+a)
print("电脑:"+c) c=random.choice(b)
if a=="石头",b=="剪刀": print("电脑:"+c)
pass if a=="石头":
else: if b=="布":
pass print("you lost")
\ No newline at end of file if b=="剪刀":
print("you win")
if b=="石头":
print("平局")
else:
if a=="剪刀":
if b=="布":
print("you win")
if b=="剪刀":
print("平局")
if b=="石头":
print("you lost")
else:
if a=="布":
if b=="布":
print("平局")
if b=="剪刀":
print("you lost")
if b=="石头":
print("you win")
\ No newline at end of file
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