Commit ea27cf88 by BellCodeEditor

auto save

parent 23dfff73
Showing with 13 additions and 0 deletions
import random
a1 = input("石头、剪刀、布:")
print("玩家出拳:"+a1)
list1 = ["石头","剪刀","布"]
a2 = random.choice(list1)
print(a2)
if a1 == a2:
print("平局")
elif (a1 =="石头" and a2 == "剪刀") or (a1 =="剪刀" and a2 == "布") or (a1 =="布" and a2 == "石头"):
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