Commit 1e9fbe07 by BellCodeEditor

save project

parent 7acfe91e
Showing with 8 additions and 1 deletions
......@@ -2,5 +2,11 @@ import random
q=input("请出拳:(石头/剪刀/布)")
print("玩家出拳:"+q)
a=['石头','剪刀','布']
o=random.choice(a))
o=random.choice(a)
print("计算机出拳:"+o)
if q==o:
print("平局")
elif q=="石头" and o=="剪刀" or q=="布" and o=="石头" or q=="剪刀" and o=="布":
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