网络编程
位置:首页>> 网络编程>> Python编程>> Python使用turtule画五角星的方法

Python使用turtule画五角星的方法

作者:pythonstart  发布时间:2022-11-10 04:51:31 

标签:Python,turtule

本文实例讲述了Python使用turtule画五角星的方法。分享给大家供大家参考。具体实现方法如下:


#!/usr/bin/env python
import turtle
import time
turtle.forward(100)
turtle.right(144)
time.sleep(1)
turtle.forward(100)
turtle.right(144)
time.sleep(1)
turtle.forward(100)
turtle.right(144)
turtle.forward(100)
time.sleep(1)
turtle.right(144)
turtle.forward(100)
time.sleep(3)

希望本文所述对大家的Python程序设计有所帮助。

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com