Commit 30b3e12f by BellCodeEditor

auto save

parent 97f67887
Showing with 17 additions and 9 deletions
file1=open(r'C:\Users\Administrator\Desktop\凯文.杜兰特.txt','w',encoding='utf-8')
file1.write('小兰:12本\n')
file1.write('小丽:11本\n')
file1.write('李文:9本\n')
file1.write('张伟:16本\n')
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
screen.bgcolor("light blue")
pen=turtle.Pen()
pen.penup()
pen.write("Hi,\n喜欢python-\n--偶工业园哈佛过渡风光",font=("times",18,"normal"))
pen.goto(100,-100)
pen.write("我也喜欢python~\-悟空",font=("Times",20,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen1.pencolor("red")
pen1.pensize(5)
len=screen.textinput("你需要多大的爱心呢?")
lovesize=int(len)
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.forward(2*len)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
pen1.circle(len,180)
pen1.forward(2*len)
pen1.hideturtle()
turtle.done()
\ No newline at end of file
turtle.done())
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