Commit 130e5cd5 by BellCodeEditor

save project

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