Commit 3bc25dae by BellCodeEditor

save project

parent 00b18051
Showing with 17 additions and 13 deletions
# 挑战赛
# 快用你机灵的小脑瓜想想,如何将刘强和他的臂力值自动插入到hero列表中?
name=input('名字')
power=int(input('臂力'))
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
# 自动排序
for i in range(1,len(hero),2):
if hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero[-6:] )
\ No newline at end of file
import turtle
#pen=turtle.Pen()
#pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n-悟空",font=("Times",20,"normal"))
#pen.hideturtle()
#画圆
pen1=turtle.Pen()
pen1.pensize(10)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(200)
pen1.circle(100,180)
pen1.right(90)
pen1.circle(100,180)
pen1.forward(200)
turtle.done()
\ 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