Commit c108773d by BellCodeEditor

auto save

parent c887f97c
Showing with 19 additions and 22 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
p=turtle.Pen()
p.penup()
p.goto(100,-100)
p.write("123456789\n123456789",font=("Times",28,"normal"))
p.hideturtle()
a=turtle.Pen()
a.pencolor("black")
a.pensize(5)
a.left(45)
a.forward(100)
a.circle(50,180)
a.right(90)
a.circle(50,180)
a.forward(100)
a.hideturtle()
turtle.done()
name='刘强'
power=66
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98]
for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero)
\ No newline at end of file
a=["苹果",10,"香蕉",7,"橘子",4,"梨",1]
b=["bb",6]
for i in range(len(a)):
if i%2==1 and a[i]<b[1]:
a.insert(i-1,b[1])
a.insert(i-1,b[0])
break
print(a)
\ 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