Topic 1

Creating Turtles 🐢

Do Now

1. How many lines of code?    4    6    8    5

2. What is around the word turtle on line 5?    (    ;    "    *

3. Which on is a colon?    :    ;    .    <

4. On which lines was the TAB key used?
 

5. How can you change the shape from turtle to circle in line 5?

 

import turtle

def task1():
	tina = turtle.Turtle()
    tina.shape("turtle")
    
    
task1()

💻

execute

First look 👀

Ignore the first lines...

 

task1() is a function we define

 

we have to call 📞 task1() to run it 👟

Inside task1()

we create a turtle 🐢 variable called tina

 

tina has a function called shape() ⬛🔴🔺⬆️🐢

The goto() function

tina has a function called goto() which moves her🏃‍♀️‍➡️to given coordinates:

 

goto(150,50)

goto(100,-100)

goto(-50,50)

def task2():
  tina =
  tina.shape( )
  tina.goto( )

task2()

Complete task2() to match the image 📷

Challenge: move to 3 other coordinates

task2()

def task3():
  tina =

task3()

Complete task3() to match the image 📷

Challenge: Discover a new shape

(research "python turtle shapes" online)

task3()

def plenary():
  tina = turtle.
  tina.shape( )
  tina.goto( )
  tina.goto( )
  tina.goto( )

Choose the right options for line 1 and 2
New()    Turtle()    Create()    Start()

turtle    circle    "turtle"    "circle"

🧑‍💻👩‍💻Complete the code to match the image

Topic 1 - Creating Turtles

By Jakob Stanley Warth

Topic 1 - Creating Turtles

  • 63