Commit 0c5da266 by BellCodeEditor

save project

parent 02b84491
Showing with 10 additions and 3 deletions
import random
a=input("请出拳:石头/剪刀/布")
print("玩家出拳"+a)
b=["石头","剪刀"",布"]
b=["石头","剪刀","布"]
r=random.choice(b)
print("计算机出拳"+r)
\ No newline at end of file
print("计算机出拳"+r)
if a==r:
print("平局")
elif a=="石头"and r=="剪刀"or a=="布"and r=="石头"or a=="剪刀"and r=="布":
print("玩家赢")
else:
print("计算机赢")
\ 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