Commit acb18d27 by BellCodeEditor

save project

parent 2c9125b7
Showing with 8 additions and 2 deletions
...@@ -5,4 +5,10 @@ print("玩家出的是:",player) ...@@ -5,4 +5,10 @@ print("玩家出的是:",player)
#计算机出拳 #计算机出拳
list1 = ("石头","剪刀","布") list1 = ("石头","剪刀","布")
list2 = r.choice(list1) list2 = r.choice(list1)
print("计算机出的是:",list2) print("计算机出的是:",list2)
\ No newline at end of file if player == list2
print("平局")
elif (player == "石头" and list2 "剪刀") or (player == "剪刀" and list2 "布") or (player == "布" and list2 "石头")
print("玩家胜利")
elif :
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