Commit 69f4a7dc by BellCodeEditor

save project

parent 1ea96107
Showing with 9 additions and 2 deletions
......@@ -2,5 +2,11 @@ player=input("请出拳(石头/剪刀/布):")
print("玩家出:"+player)
import random
list=["石头","剪刀","布"]
电脑=random.choice(list)
print("电脑出:"+电脑)
com=random.choice(list)
print("电脑出:"+com)
if com==player:
print("平局")
elif (player=="石头"and com=="剪刀")or(player=="剪刀"and com=="布")or(player=="布"and com=="石头"):
print("恭喜!你赢了")
else:
("你输了")
\ 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