Yr 7 turtle python 1

1 / 11
next
Slide 1: Slide
New lesson editor

This lesson contains 11 slides, with text slides.

Report this lesson

Items in this lesson





  • Learning Objective: Know how computers execute instructions in a sequence


  • PREDICT


  • What will this program do when run? Write down your predictions.



  • Demo


  • How to run programs in Python IDLE



  • RUN


  • Try running the program using the link below.

  • Did it perform as expected?


  • https://trinket.io/turtle/4bf49c078b



  • SEQUENCING


  • Programs run in the order that they are written. The first line is executed first and then the second line and so on.

  • It is really important to get the program lines in the correct order, otherwise the program will have unexpected results


  • INVESTIGATE


  • Our program is split in to lines, which are numbered. Python (the programming language) will execute each line of code in the order it is written.

  • It will start with the first line and finish on line 6.


  • On line 1 and 2 we are setting up the turtle to
    be used.

  • On line 4-6 we are giving it movement
    instructions.

  • INVESTIGATE


  1. What happens if we re-order the instructions? Does the same thing happen?

  2. What do the numbers in the brackets mean? What happens if we change them?

  3. Change the numbers to negative values.

  4. Is there a backward command? Try using it.

  5. Change the name of the turtle on line 2 from t to something else. What happens?

  • MODIFY

  1. Amend the program so that it draws the following shapes:

    1. Square

    2. Triangle

    3. Rectangle

    4. Pentagon

    5. A shape of your choice

  • MAKE

  • Create a Python program that:

  • Write your name on the canvas


  • REVIEW

  • Reorder this program so that it is properly sequenced.

  • It should draw a triangle.