Commit 44549a79 by BellCodeEditor

save project

parent 57b21fdf
Showing with 11 additions and 2 deletions
......@@ -4,4 +4,14 @@ player = input("请出拳:")
print("玩家:" + player)
list = ["剪刀","石头", "布"]
compdhu = random.choice(list)
print("电脑:" + compdhu)
\ No newline at end of file
print("电脑:" + compdhu)
if player == compdhu:
print("平局")
elif player == "石头" and compdhu == "剪刀"
print("你赢了")
elif player == "剪刀" and compdhu == "布"
print("你赢了")
elif player == "布" and compdhu == "石头"
print("你赢了")
else:
print("你输了")
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