Commit 030d424c by BellCodeEditor

auto save

parent 36f9774b
Showing with 44 additions and 0 deletions
name = input("请输入")
print(int(name))
\ No newline at end of file
import turtle
pen = turtle.Pen()
screen = turtle.Screen()
screen.bgcolor("light blue")
len =int(screen.textinput("提示1","你想要多大的花啊,\n注:太大会超出屏幕的!"))
n =int(screen.textinput("提示2","你想要几个花瓣,\n注:太大会超出屏幕的!"))
pen.penup()
pen.goto(60,-120)
pen.write("你好啊,诺一,\n最近吃胖没有啊",font=("Times",20,"normal"))
pen.hideturtle()
pen.goto(-100,0)
pen.pendown()
pen.speed(100)
# len=100
# n=12
pen.fillcolor("red")
pen.begin_fill()
for i in range(n):
pen.forward(len)
pen.left(360/n)
pen.end_fill()
for i in range(n):
pen.right(90)
pen.circle(len/2,180) #第一个参数是画出圆的半径 第二参数是画出圆的角度,这是决定是圆还是半圆还是扇形
pen.right(90)
pen.left(360/n)
turtle.done()
# pen.fillcolor("red") # 设置填充的颜色
# pen.begin_fill() # 开始填充
# for i in range(130): #重复执行五次,让画笔移动200,右转144度
# pen.forward(200)
# pen.right(166)
# pen.end_fill() # 结束填充
\ 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