Commit e4e06966 by BellCodeEditor

save project

parent 0d52e0ad
Showing with 13 additions and 2 deletions
......@@ -2,5 +2,15 @@ import random
onr = input("玩家请出拳(剪刀/石头/布)? ")
list=["石头","剪刀","布"]
to=random.choice(list)
print("玩家出拳"+onr)
print("计算机"+to)
print("玩家出拳 "+onr)
print("计算机出拳 "+to)
if onr==to:
print("平局")
elif onr=="石头"and"剪刀"==to:
print("玩家胜出")
elif onr=="剪刀"and"布"==to:
print("玩家胜出")
elif onr=="布"and"石头"==to:
print("玩家胜出")
else:
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