Commit cbd6127f by BellCodeEditor

save project

parent 6ce252cc
Showing with 4 additions and 5 deletions
#玩家出拳 #玩家出拳
player=input("请出拳(石头/剪刀/布):")
#计算机随机出拳
import random import random
player=input("请出拳(石头/剪刀/布):")
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
computer=random.choice(list) computer=random.choice(list)
print("玩家出拳:"+player)
print("计算机出拳:"+computer) print("计算机出拳:"+computer)
if player in list: if player in list:
if player==computer: if player==computer:
...@@ -14,4 +13,4 @@ if player in list: ...@@ -14,4 +13,4 @@ if player in list:
else: else:
print("很遗憾,你输了") print("很遗憾,你输了")
else: else:
print("") print("你输入错误")
\ No newline at end of file \ 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