Commit 130e5cd5 by BellCodeEditor

save project

parent 08a24317
Showing with 8 additions and 22 deletions
player = input("请出拳/石头/剪刀/布:") a=['吕布']
print("玩家出:" + player) b=['袁术','公孙瓒','刘备','张飞','关羽','曹操']
import random a.extend(b[2:5])
list=["石头","剪刀","布"] print(a)
computer=random.choice(list) \ No newline at end of file
print(computer)
if player==computer:
print("平局")
elif player=="布" and computer=="石头":
print("牛逼")
elif player=="石头" and computer=="剪刀":
print("牛逼")
elif player=="剪刀" and computer=="布":
print("牛逼")
else:
print("垃圾")
\ No newline at end of file
# 勇于挑战的创造师,请运行这段代码,看看能不能将颜良、文丑加入战场? b=['袁术','公孙瓒','关羽','刘备','张飞','曹操']
a= ['华雄'] print(b[2:5])
a.append('颜良,文丑') \ No newline at end of file
print(a)
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