Commit de19778f by BellCodeEditor

save project

parent 3bac6861
Showing with 22 additions and 0 deletions
...@@ -5,3 +5,24 @@ import random ...@@ -5,3 +5,24 @@ import random
list1=["石头","剪刀","布"] list1=["石头","剪刀","布"]
computer=random.choice(list1) computer=random.choice(list1)
print("计算机出",computer) print("计算机出",computer)
if player=="石头":
if computer=="石头":
print("平局")
elif computer=="剪刀":
print("玩家赢")
elif computer=="布":
print("计算机赢")
if player=="剪刀":
if computer=="石头":
print("计算机赢")
elif computer=="剪刀":
print("平局")
elif computer=="布":
print("玩家赢")
if player=="布":
if computer=="石头":
print("玩家赢")
elif computer=="剪刀":
print("计算机赢")
elif computer=="布":
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