Last active
August 29, 2015 14:01
-
-
Save ramalho/ca3a355b3df471e29282 to your computer and use it in GitHub Desktop.
Turtle graphics on the Raspberry Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Double-click LXTerminal and type: | |
| $ idle -n | |
| (the IDLE window appears) | |
| >>> from turtle import * | |
| >>> fd(100) | |
| (a window with a line appears) | |
| How to draw a square: | |
| >>> fd(100) | |
| >>> rt(90) | |
| >>> fd(100) | |
| >>> rt(90) | |
| >>> fd(100) | |
| >>> rt(90) | |
| >>> fd(100) | |
| >>> rt(90) | |
| IDLE menu: | |
| File -> New Window | |
| (a blank window appears, you type:) | |
| from turtle import * | |
| def tri(size): | |
| fd(size) | |
| rt(120) | |
| fd(size) | |
| rt(120) | |
| fd(size) | |
| rt(120) | |
| File -> Save | |
| figura.py [Save] | |
| (abrir Python Shell) | |
| >>> from figura import * | |
| >>> tri(100) | |
| >>> rt(10) | |
| >>> tri(90) | |
| >>> rt(10) | |
| >>> tri(90) | |
| >>> rt(10) | |
| >>> for n in range(36): | |
| ... rt(10) | |
| ... tri(90) | |
| >>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment