Commit c6ab4f68 by BellCodeEditor

save project

parent fc9e0014
Showing with 2 additions and 14 deletions
...@@ -6,16 +6,4 @@ print("玩家出拳是:+player") ...@@ -6,16 +6,4 @@ print("玩家出拳是:+player")
import random import random
list=["剪刀""石头""布"] list=["剪刀""石头""布"]
computer=random.choice(list) computer=random.choice(list)
print(电脑出拳是:+computer") print(电脑出拳是:+comput")
\ No newline at end of file
# 判断
if player==computer
print("平局")
elif player=="剪刀" and omputer == "":
print("玩家胜利")
elif player== "" and omputer == "石头":
print("玩家胜利")
elif player== "石头"and omputer == "剪刀":
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