Starting on chapter of 2 of the Learning Python with Raspberry Pi they teach us to draw Pictures with turtles.
In this tutorial they recommend you use IDLE 3 to write up and process of your code.
This program has got to be the cutest thing I have written since I started programming in python. It's very easy to type up and the instructions in the book were very clear and I learned a few python terms while creating my flower.
- import: usually at the start of the program. bring extra features in the program. (similar to add-ons or plug-ins)
- window: creates a new window that we can draw into. we can also set it to close when clicked
- babbage: has multiple methods but in this program it was used to create the petals
- loop: a piece of code that tells the computer to repeat a certain section of code over and over again.
- conditionals; if, elif, and else: a way of telling python how to make decisions about what to do based on certain data.
In result you end up with this in the Python IDE:
and this when the code is ran:
these are a few other variations after changing the colors in the code:
I did encounter a few syntax issues dealing with spacing and punctuation after re-visiting this program. After typing it up again it was nothing I couldn't easily fix.