Commit 92484f2f by BellCodeEditor

save project

parent 17adc507
Showing with 16 additions and 5 deletions
PC=input("出拳吧,骚年!")
print("玩家出拳:"+PC)
import random
list=["石头","剪刀","布"]
CC=random.choice(list)
print("电脑出拳:"+CC)
\ No newline at end of file
while True:
PC=input("出拳吧,骚年!")
if PC=="退出":
print("拜拜")
break
print("玩家出拳:"+PC)
CC=random.choice(list)
print("电脑出拳:"+CC)
if PC==CC:
print('小伙子,你平局了')
elif (PC=="石头" and CC=="剪刀") or (PC=="剪刀" and CC=="布") or (PC=="布" and CC=="石头"):
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