美文网首页
国庆了--祝福祖国母亲--制作面国旗

国庆了--祝福祖国母亲--制作面国旗

作者: 麦芽maiya | 来源:发表于2020-10-03 14:27 被阅读0次

python代码如下:

import turtle as tu

tu.hideturtle()    #隐藏海龟

tu.speed(10)

tu.title("祝福祖国母亲节日快乐")  #显示海龟绘图窗口的标题栏文本

n = float(tu.textinput("N","Please enter the times you want."))      #国旗放大的倍数,textinput()函数用于返回用户输入的参数

#旗面

tu.penup()

tu.goto(-150*n,100*n)

tu.pendown()

tu.pencolor("red")

tu.begin_fill()

tu.fillcolor("red")

tu.fd(300*n)

tu.right(90)

tu.fd(200*n)

tu.right(90)

tu.fd(300*n)

tu.right(90)

tu.fd(200*n)

tu.end_fill()

#大星星

tu.penup()

tu.goto(-100*n,80*n)

tu.pendown()

tu.pencolor("yellow")

tu.begin_fill()

tu.fillcolor("yellow")

tu.setheading(-72)

for i in range(5):

    tu.fd(57.06*n)

    tu.right(144)

tu.end_fill()

#小星星1

tu.penup()

tu.goto(-60*n,70*n)

tu.pendown()

tu.pencolor("yellow")

tu.begin_fill()

tu.fillcolor("yellow")

tu.setheading(70)

for i in range(5):

    tu.fd(19.02*n)

    tu.right(144)

tu.end_fill()

# 小星星2

tu.penup()

tu.goto(-40*n,63*n)

tu.pendown()

tu.pencolor("yellow")

tu.begin_fill()

tu.fillcolor("yellow")

tu.setheading(10)

for i in range(5):

    tu.fd(19.02*n)

    tu.right(144)

tu.end_fill()

#小星星3

tu.penup()

tu.goto(-36*n,25*n)

tu.pendown()

tu.pencolor("yellow")

tu.begin_fill()

tu.fillcolor("yellow")

tu.setheading(70)

for i in range(5):

    tu.fd(19.02*n)

    tu.right(144)

tu.end_fill()

# 小星星4

tu.penup()

tu.goto(-60*n,20*n)

tu.pendown()

tu.pencolor("yellow")

tu.begin_fill()

tu.fillcolor("yellow")

tu.setheading(-20)

for i in range(5):

    tu.fd(19.02*n)

    tu.right(144)

tu.end_fill()

tu.done()

相关文章

  • 国庆了--祝福祖国母亲--制作面国旗

    python代码如下: import turtle as tu tu.hideturtle() #隐藏海龟 t...

  • 祖国母亲生日快乐

    今天是祖国母亲七十岁生日,今天我的朋友圈里被国旗和对祖国母亲的祝福刷屏了,群聊里也是祝福不断,而我却被一个朋友的国...

  • 国庆手抄报的制作

    国庆手抄报的制作 金秋十月,国旗飘扬。国庆节就要到来了。举行了“我和我的祖国妙笔作文”初赛,还可以用什么...

  • 少年中国说

    今天是2021-10-01,国庆节,祖国母亲的第七十二个生日。在这里祝福祖国母亲生日快乐,我爱你。 昨天妹妹放假了...

  • 升国旗

    这里是中国西北方,中国新疆,新疆喀什,我在这里,我在升国旗,祝福祖国母亲72岁华诞快乐!

  • 祖国生日快乐

    今天是祖国七十二华诞。在此祝福我们的国家生日快乐!在共升一面国旗,让我们共祝祖国繁荣昌盛,人民的生活更加美好...

  • 河北唐山举行丰富多彩活动庆祝新中国69周年华诞精彩回顾

    中国公益记录者在线河北讯(公益记录者 李银凤)奋进新时代 欢度国庆 祝福祖国更美好。庄严肃穆的升国旗仪式...

  • 祝福

    祖国母亲 大地母亲 祝福你们

  • 2018-10-01

    国庆节,祖国母亲的生日。早晨看了升国旗仪式,国旗冉冉升起心中的那份自豪不禁油然而生,有机会一定得亲自去,感受一下那...

  • 自制logo

    祝福亲爱的祖国 欢度国庆佳节

网友评论

      本文标题:国庆了--祝福祖国母亲--制作面国旗

      本文链接:https://www.haomeiwen.com/subject/ncewuktx.html