Python: Turtle
Ax_Introduction
Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967.
refer:
https://www.jianshu.com/p/b502c89132dd
https://docs.python.org/3/library/turtle.html
Bx_Note
setx()
sety()
seth()/setheading()
goto(x,y)
circle(r,e)
dot(r,color)
forward()
backward()
pendown()
penup()
left()
right()
...
Cx_Instance
No.1,wjx
from turtle import * setup(400,400) penup() goto(-100,50) pendown() color("red") begin_fill() for i in range(5): forward(200) right(144) end_fill() hideturtle() done()
No.2,love
from turtle import * color('red','pink') begin_fill() left(135) fd(100) right(180) circle(50,-180) left(90) circle(50,-180) right(180) fd(100) end_fill() hideturtle() done()
No.3,lx
import turtle n = 10 for i in range(1,10,1): for j in [90,180,-90,0]: turtle.seth(j) turtle.fd(n) n += 5
No.4,textinput
>>> turtle.textinput("NIM","What is your name?")
Dx_Hit the pit
by En0moThem
相关推荐
YENCSDN 2020-11-17
lsjweiyi 2020-11-17
houmenghu 2020-11-17
Erick 2020-11-17
HeyShHeyou 2020-11-17
以梦为马不负韶华 2020-10-20
lhtzbj 2020-11-17
夜斗不是神 2020-11-17
pythonjw 2020-11-17
dingwun 2020-11-16
lhxxhl 2020-11-16
坚持是一种品质 2020-11-16
染血白衣 2020-11-16
huavhuahua 2020-11-20
meylovezn 2020-11-20
逍遥友 2020-11-20
weiiron 2020-11-16