levo

Problem Solving with Programming

Turtle graphics

  • 3 things to know
  • Paper 2
Start revising · £5/month

Overview

Creating a turtle, moving and turning it, drawing shapes with loops, lifting and lowering the pen, pen colour, size and filled shapes, circles and arcs, setting position and heading, home and reset, standard and logo modes, speed, hiding the turtle, and the screen functions.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Process

What do pen.pencolor("red") and pen.pensize(5) change?

Process

What do hideturtle() and showturtle() do?

Process

What do pen.left(90) and pen.right(90) do?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    How is a turtle created in a Python program?

    Model answer

    The line import turtle is followed by pen = turtle.Turtle(), which creates a turtle called pen. The turtle starts at the origin (0, 0) with its pen down.

  2. 2

    What do pen.forward(100) and pen.back(100) do?

    Model answer

    The call forward(100) moves the turtle 100 steps the way it is facing, and back(100) moves it 100 steps the opposite way. Neither call turns the turtle, and a line is drawn if the pen is down.

  3. 3

    What do pen.left(90) and pen.right(90) do?

    Model answer

    The call left(90) turns the turtle 90 degrees counterclockwise, and right(90) turns it 90 degrees clockwise. The turtle turns on the spot without moving.

  4. 4

    What is drawn by for i in range(4): pen.forward(50), then pen.left(90)?

    Model answer

    The code draws a square with sides of 50 steps. The four 90-degree turns bring the turtle back to its start, facing its original direction.

  5. 5

    How do penup() and pendown() differ?

    Model answer

    The call penup() lifts the pen, so the turtle moves without drawing. The call pendown() puts the pen back down, so later moves draw lines again.

  6. 6

    What do pen.pencolor("red") and pen.pensize(5) change?

    Model answer

    The call pencolor("red") makes the lines drawn after it red. The call pensize(5) makes those lines 5 units wide.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Computational Thinking
Data
Computers
Networks

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

The check is 45 + 27 = 72.
denarybinaryhexadecimal

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A kibibyte (KiB) is 1,024 bytes. The figure 1,024 is 2¹⁰.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Problem Solving with Programming, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.