Commit c70ba1b5 by BellCodeEditor

save project

parent 0373f47a
Showing with 9 additions and 25 deletions
...@@ -6,28 +6,13 @@ while True: ...@@ -6,28 +6,13 @@ while True:
print("玩家:"+a) print("玩家:"+a)
c=random.choice(b) c=random.choice(b)
print("电脑:"+c) print("电脑:"+c)
if a=="石头": if a==b:
if b=="布": print("平局")
print("you lost") elif a=="剪刀" and b=="布":
if b=="剪刀": print("你赢了")
print("you win") elif a=="布" and b=="石头":
if b=="石头": print("你赢了")
print("平局") elif a=="石头" and b=="剪刀":
print("你赢了")
else: else:
if a=="剪刀": print("你输了")
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