Lesson Objectives
- To understand what a loop is
- To understand how to use a simple for loop
- To develop computational thinking skills
Amber - You will have edited the colour, and position of the hexagon
Green - You will use the skills learnt to draw a simple house
Starter
Main
RED TASKA) Type up a program to create a hexagon - use the help below if you need:
B) Save it as hexagon.py
C) Test it and make sure it works properly
AMBER TASK
A) Add this code to your hexagon.py program before for x in range (6):
Screen().bgcolor("yellow")
terry.color("blue")
terry.pensize(5)
B) Run your program what does this new code do?
C) Can you tweak the code?
GREEN TASK
A) Use this code to move to a new place on the screen and then draw a second hexagon
terry.penup() # pick up the pen
terry.goto(10,10) # go to a x and y position
terry.pendown() # put the pen down
B) Post your code on your computer science blog
EXTENSION TASK
A) Using what you have learnt draw a simple house like this one. You will need to use terry.begin_fill() And terry.end_fill()
B) Post your code on your computer science blog
No comments:
Post a Comment