Commit 9dd92e42 by BellCodeEditor

auto save

parent de104abc
Showing with 27 additions and 19 deletions
# a=float(input('请输入华氏度'))
# c=(a-32)/1.8 华氏度变摄氏度
# print('%s%f %s%f' % ('华氏度',a,'摄氏度',c))
r=int(input('请输入圆的半径'))
c=2*3.14*r
s=3.14*r*r
print('半径为%d的圆的周长为%.2f' %(r,c))
print('半径为%d的圆的面积为%.2f' %(r,s))
\ No newline at end of file
import turtle # import turtle
a=turtle.Pen() # a=turtle.Pen()
a.penup() # a.penup()
a.goto(-100,0) # a.goto(-100,0)
a.write('听我说谢谢你',font=('Tine',30,'normal')) # a.write('听我说谢谢你',font=('Tine',30,'normal'))
len=50 # len=50
a1=turtle.Pen() # a1=turtle.Pen()
a1.pencolor('red') # a1.pencolor('red')
a1.left(45) # a1.left(45)
a1.forward(2*len) # a1.forward(2*len)
a1.circle(len,180) # a1.circle(len,180)
a1.right(90) # a1.right(90)
a1.circle(len,180) # a1.circle(len,180)
a1.forward(2*len) # a1.forward(2*len)
s=turtle.Screen() # s=turtle.Screen()
s.bgcolor('yellow') # s.bgcolor('yellow')
a.hideturtle() # a.hideturtle()
turtle.done() # turtle.done()
-- "a/\347\254\254\344\270\200.py"
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