当前位置:网站首页>Complete list of common functions of turtle module
Complete list of common functions of turtle module
2022-07-06 04:26:00 【Michael. py】
For the convenience of study , This article will turtle Summary of common functions and methods in the Library :
| command | explain |
|---|---|
turtle.forward(distance) or turtle.fd(distance) | Move towards the current brush distance Pixel length |
turtle.backward(distance) or turtle.bw(distance) | Move in the opposite direction of the current brush distance Pixel length |
| turtle.right(degree) | Move clockwise degree angle |
| turtle.left(degree) | Move counterclockwise degree angle |
| turtle.penup() | Lift the pen and move , No graphics , For another place to draw |
| turtle.pendown() | The paintbrush falls , Draw a picture when moving , By default, it is also drawing graphics |
| turtle.goto(x, y) | Move the brush to the coordinates (x, y) The location of |
| turtle.circle() | A circle |
| setx() | Will the current x The axis moves to the specified position |
| sety() | Will the current y The axis moves to the specified position |
setheading(angle) or seth(angle) | Set the current orientation to angle angle |
| home() | Set the current brush position to the origin , Towards the East |
| dot() | Draw a dot of a specified diameter and color |
| turtle.fillcolor(colorstring) | The fill color of the drawing |
| turtle.color(color1, color2) | Simultaneous setting pencolor = colorl,fillcolor=color2 |
| turtle.filling() | Returns whether or not the current filling state |
| turtle.begin_fill() | Ready to start filling in figures |
| turtle.end_fill() | Filling complete |
| turtle.hideturtle() | Hide the brush turrle shape |
| turtle.showturtle() | Showing the brush turtle shape |
turtle.mainloop() or turtle.done() | Start event cycle one call Tkinter Of mainloop function , It must be the last statement in the turtle graphics program |
| turtle.mode(mode=None) | Set tortoise mode (“standard” “logo” or “world”) And perform a reset , If no mode is given , Then return to the current mode |
| turtle.delay(delay=None) | Sets or returns the plot delay in milliseconds |
| turtle.begin_poly() | Start recording the vertices of the polygon , The current tortoise position is the first vertex of the polygon |
| turtle.end_poly() | Stop recording polygon vertices , The current tortoise position is the last vertex of the polygon , Will be connected to the first vertex |
边栏推荐
- Comprehensive ability evaluation system
- 2/13 review Backpack + monotonic queue variant
- Is the mode of education together - on campus + off campus reliable
- Brief tutorial for soft exam system architecture designer | general catalog
- 【HBZ分享】云数据库如何定位慢查询
- Global and Chinese market of aircraft anti icing and rain protection systems 2022-2028: Research Report on technology, participants, trends, market size and share
- Guitar Pro 8.0最详细全面的更新内容及全部功能介绍
- Script lifecycle
- IDEA编译JSP页面生成的class文件路径
- Tengine kernel parameters
猜你喜欢

Certbot failed to update certificate solution

1291_ Add timestamp function in xshell log

Solutions: word coverage restoration, longest serial number, Xiaoyu buys stationery, Xiaoyu's electricity bill

Fundamentals of SQL database operation

Is the mode of education together - on campus + off campus reliable

Coreldraw2022 new version new function introduction cdr2022

How to solve the problem of slow downloading from foreign NPM official servers—— Teach you two ways to switch to Taobao NPM image server

Yyds dry inventory automatic lighting system based on CC2530 (ZigBee)

When debugging after pycharm remote server is connected, trying to add breakpoint to file that does not exist: /data appears_ sda/d:/segmentation

Redis —— Redis In Action —— Redis 实战—— 实战篇一 —— 基于 Redis 的短信登录功能 —— Redis + Token 的共享 session 应用— 有代码
随机推荐
2328. 网格图中递增路径的数目(记忆化搜索)
深入浅出node模板解析错误escape is not a function
The most detailed and comprehensive update content and all functions of guitar pro 8.0
Execution order of scripts bound to game objects
Lora gateway Ethernet transmission
After learning classes and objects, I wrote a date class
Solution of storage bar code management system in food industry
满足多元需求:捷码打造3大一站式开发套餐,助力高效开发
Yyds dry goods inventory hcie security Day11: preliminary study of firewall dual machine hot standby and vgmp concepts
Solutions: word coverage restoration, longest serial number, Xiaoyu buys stationery, Xiaoyu's electricity bill
2327. 知道秘密的人数(递推)
[network] channel attention network and spatial attention network
2/11 matrix fast power +dp+ bisection
newton interpolation
VPP性能测试
Hashlimit rate control
P2022 interesting numbers (binary & digit DP)
P3500 [poi2010]tes intelligence test (two points & offline)
When debugging after pycharm remote server is connected, trying to add breakpoint to file that does not exist: /data appears_ sda/d:/segmentation
View 工作流程