Commit 950fc45f by BellCodeEditor

save project

parent c9a54ccc
Showing with 9 additions and 3 deletions
...@@ -4,9 +4,14 @@ print("玩家出拳"+nema) ...@@ -4,9 +4,14 @@ print("玩家出拳"+nema)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
o=random.choice(list) o=random.choice(list)
print("电脑出"+o) print("电脑出"+o)
if nema==0: if nema in list:
if nema==0:
print("平局") print("平局")
elif (nema=="石头" and o==剪刀)or(nema=="布" and o=="石头") or (nema=="剪刀" and o=="布"): elif (nema=="石头" and o==剪刀)or(nema=="布" and o=="石头") or (nema=="剪刀" and o=="布"):
print("你赢了") print("你赢了")
else: else:
print("你输了") 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