Flashcards
revision
Cards in this deck (12)
- 1—import turtle
wn = turtle.Screen()
daisy = turtle. Turtle() - 2programming definitionprogramming is simply providing instructions to a computer to solve a problem.
- 3problem solvingThe main skill that programming requires is problem solving
To solve problems, we mustn’t be afraid to get it wrong - 4pythonpython is a programming language
instructions are written using python, which the computer then executes.
python is supported on nearly every device. - 5what code do we use to start.import turtle
wn = turtle.Screen()
daisy = turtle.Turtle() - 6penup()penup() - tells the turtle when to stop drawing and move to another destination without leaving a line towards that direction. like penup()
daisy.forward(34) - 7pendown()pendown() - tells the turtle to start drawing, so lines can be created.
- 8pencolor()pencolor() - in the code where it says colour it is spelt the american way instead.
When doing the code you have to put pencolor("blue") you have to put speech marks. - 9fillcolor(), begin_fill() and end_fill()filling in the shape is trickier
- 10loopswhen we spot a pattern repeating we can use a more efficient way to lay it out.
To loop a code we use: for X in range (5):
And then indent the code we wish to loop:
for x in range (4):
bobby.forward(300)
bobby.left(50) - 11mathstyping 360/6 will calculate the angle, without us having to do it.
- 12defining a procedure
Information
- Description
- Flashcards on revision, created by jodie stanton on 24/05/2021.
- Created by
- jodie stanton
- Views
- 1
- Rating