Commit 3bc25dae by BellCodeEditor

save project

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