Commit 26b229d3 by BellCodeEditor

auto save

parent 23d70366
Showing with 38 additions and 14 deletions
import.turtle as t
t.speed()
t.pensize()
t.pencolor('rad')
t.penup()
t.goto(-300,-200)
t.pendown()
t.fillcolor('red')
t.begin_fill()
for i in range(2):
t.forward(600)
t.left(90)
t.forward(400)
t.left(90)
t.done()
\ No newline at end of file
# 臂力挑战赛 import.turtle as t
# 快用你机灵的小脑瓜想想,如何将刘强和他的臂力值自动插入到hero列表中? t.speed()
name='刘强' t.pensize()
power=66 t.pencolor('rad')
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] t.penup()
# 自动排序 t.goto(-300,-200)
for i in range(len(hero)): t.pendown()
if i%2==1 and hero[i]>=power: t.fillcolor('red')
hero.insert(i-1,name) t.begin_fill()
hero.insert(i,power) for i in range(2):
print(hero) t.forward(600)
a=hero[6:12] t.left(90)
print(a) t.forward(400)
\ No newline at end of file t.left(90)
t.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