turtle-평행사변형
언어/python2018. 1. 1. 21:37
import turtle
def main():
turtle.speed(1) # turtle 이 이동하는 속도
print(turtle.position()) # 현재 turtle의 위치
turtle.forward(150)
turtle.right(135)
turtle.forward(150)
print(turtle.position())
turtle.right(45)
turtle.forward(150)
print(turtle.position())
turtle.right(135)
turtle.forward(150)
print(turtle.position())
turtle.exitonclick()
if __name__ == "__main__":
main()
'언어 > python' 카테고리의 다른 글
turtle - 기하학 (0) | 2018.01.01 |
---|---|
turtle - 삼각형 (0) | 2018.01.01 |
MongoDB (0) | 2018.01.01 |
python + mongodb_2 (0) | 2017.12.28 |
python + mysql (2) | 2017.12.28 |