Python中Turtle模块的基本指令有哪些

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python中Turtle模块的基本指令有哪些相关的知识,希望对你有一定的参考价值。

参考技术A >>> dir(turtle)['Canvas', 'Pen', 'RawPen', 'RawTurtle', 'Screen', 'ScrolledCanvas', 'Shape', 'TK', 'TNavigator', 'TPen', 'Tbuffer', 'Terminator', 'Turtle', 'TurtleGraphicsError', 'TurtleScreen', 'TurtleScreenBase', 'Vec2D', '_CFG', '_LANGUAGE', '_Root', '_Screen', '_TurtleImage', '__all__', '__builtins__', '__doc__', '__file__', '__forwardmethods', '__func_body', '__methodDict', '__methods', '__name__', '__package__', '__stringBody', '_alias_list', '_make_global_funcs', '_math_functions', '_screen_docrevise', '_tg_classes', '_tg_screen_functions', '_tg_turtle_functions', '_tg_utilities', '_turtle_docrevise', '_ver', 'acos', 'acosh', 'addshape', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'back', 'backward', 'begin_fill', 'begin_poly', 'bgcolor', 'bgpic', 'bk', 'bye', 'ceil', 'circle', 'clear', 'clearscreen', 'clearstamp', 'clearstamps', 'clone', 'color', 'colormode', 'config_dict', 'copysign', 'cos', 'cosh', 'deepcopy', 'degrees', 'delay', 'distance', 'done', 'dot', 'down', 'e', 'end_fill', 'end_poly', 'erf', 'erfc', 'exitonclick', 'exp', 'expm1', 'fabs', 'factorial', 'fd', 'fill', 'fillcolor', 'floor', 'fmod', 'forward', 'frexp', 'fsum', 'gamma', 'get_poly', 'getcanvas', 'getmethparlist', 'getpen', 'getscreen', 'getshapes', 'getturtle', 'goto', 'heading', 'hideturtle', 'home', 'ht', 'hypot', 'isdown', 'isfile', 'isinf', 'isnan', 'isvisible', 'join', 'ldexp', 'left', 'lgamma', 'listen', 'log', 'log10', 'log1p', 'lt', 'mainloop', 'math', 'mode', 'modf', 'onclick', 'ondrag', 'onkey', 'onrelease', 'onscreenclick', 'ontimer', 'os', 'pd', 'pen', 'pencolor', 'pendown', 'pensize', 'penup', 'pi', 'pos', 'position', 'pow', 'pu', 'radians', 'read_docstrings', 'readconfig', 'register_shape', 'reset', 'resetscreen', 'resizemode', 'right', 'rt', 'screensize', 'seth', 'setheading', 'setpos', 'setposition', 'settiltangle', 'setundobuffer', 'setup', 'setworldcoordinates', 'setx', 'sety', 'shape', 'shapesize', 'showturtle', 'sin', 'sinh', 'speed', 'split', 'sqrt', 'st', 'stamp', 'tan', 'tanh', 'tilt', 'tiltangle', 'time', 'title', 'towards', 'tracer', 'trunc', 'turtles', 'turtlesize', 'types', 'undo', 'undobufferentries', 'up', 'update', 'width', 'window_height', 'window_width', 'write', 'write_docstringdict', 'xcor', 'ycor']>>>

以上是关于Python中Turtle模块的基本指令有哪些的主要内容,如果未能解决你的问题,请参考以下文章

Python用turtle模块画图

python第二周基本图形绘制

吴裕雄--天生自然python编程:turtle模块绘图

Python基本图形绘制库——turtle

Python 让小海龟互动起来——turtle和tkinter混合使用!

[Python] turtle库的基本使用