Python turtle.circle()函数

turtle.circle()函数

    定义:turtle.circle(radius, extent=None)

    作用:根据半径radius绘制extent角度的弧形

    参数:

              radius弧形半径

                             当radius值为数时,圆心在当前位置/小海龟侧。

                             当radius值为数时,圆心在当前位置/小海龟侧。

              extent弧形角度。当无该参数或参数为None时,绘制整个圆形

                             当extent值为数时,小海龟当前方向绘制。

                             当extent值为数时,小海龟当前方向绘制。

复制代码
import turtle
turtle.goto(0,0)
turtle.write("(0,0)")
turtle.color("red")
turtle.circle(50)
turtle.done()

import turtle
turtle.goto(0,0)
turtle.write("(0,0)")
turtle.color("green")
turtle.circle(-50)
turtle.done()

import turtle
turtle.goto(0,0)
turtle.write("(0,0)")
turtle.color("blue")
turtle.circle(-50,90)
turtle.done()

import turtle
turtle.goto(0,0)
turtle.write("(0,0)")
turtle.color("brown")
turtle.circle(-50,-90)
turtle.done()
复制代码

 

 

 

 

 

 

 

 

 

 

 

 

 

 

REF

https://blog.csdn.net/hnjzsyjyj/article/details/102938892

 

posted @   emanlee  阅读(7287)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
历史上的今天:
2013-09-08 bash 正则表达式匹配,一行文本中 “包含 ABC” 并且 “不包含 XYZ”
2013-09-08 linux 用grep匹配横线
2011-09-08 Oracle 创建和删除维
2008-09-08 2008秋季-计算机软件基础-0908课堂用例(2)
2008-09-08 2008秋季-计算机软件基础-0908课堂用例(1)
2007-09-08 2008秋季-计算机软件基础-如何使用FTP下载局域网内资源
点击右上角即可分享
微信分享提示