Commit de19778f by BellCodeEditor

save project

parent 3bac6861
Showing with 23 additions and 2 deletions
......@@ -4,4 +4,25 @@ print("玩家出:",player)
import random
list1=["石头","剪刀","布"]
computer=random.choice(list1)
print("计算机出",computer)
\ No newline at end of file
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