Commit 2e75379d by BellCodeEditor

save project

parent f7fb4bd8
Showing with 48 additions and 6 deletions
'''for i in range(4):
if i ==2:
break
print(i)'''
'''n=0
while n !=3:
n+1
print(n)'''
'''t=[1,2,3,4,]
m=t[2:3]
print(m)'''
'''l=[[0,1,2,3,4,5,]]
print(l[0])'''
'''shello,python
print(s[0]+s[-1])'''
'''s=hello,python
print(lem(s[0]+s[-1]))'''
'''s1='abc'
s2='abc'
for i in range(len(sl))'''
'''s1=0
s2=0
while s1<10:
if s1%2==0:
s2+=s1
s1+=1
print(s2) '''
s='123456'
'''int=[]
for int(i) in s:
if int(i) > int(i)+1:
lst.append(int)'''
import turtle
screen=turtle.Screen()
screen.textinput("姓名","你的名字是:")
turtle.done()
\ No newline at end of file
# 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("light blue") screen.bgcolor("light blue")
len=screen.textinput("100","100") len=screen.textinput("爱心","爱心大小")
lenn=int(len)
pen=turtle.Pen() pen=turtle.Pen()
pen.goto(100,100) pen.goto(100,100)
pen.write("你好诺依\n我是悟空\n我喜欢你",font=("Times",13,"normal")) pen.write("你好诺依\n我是悟空\n我喜欢你",font=("Times",13,"normal"))
...@@ -11,10 +12,10 @@ pen1=turtle.Pen() ...@@ -11,10 +12,10 @@ pen1=turtle.Pen()
pen1.pencolor("green") pen1.pencolor("green")
pen1.pensize(5) pen1.pensize(5)
pen1.left(45) pen1.left(45)
pen1.forward(100) pen1.forward(2*lenn)
pen1.circle(50,180) pen1.circle(lenn,180)
pen1.right(90) pen1.right(90)
pen1.circle(50,180) pen1.circle(lenn,180)
pen1.forward(100) pen1.forward(2*lenn)
pen1.hideturtle() pen1.hideturtle()
turtle.done() 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