Lesson 6
Project
By the end of this lesson, you will…
Learning Objectives
Creating a project
In this lesson, we shall use all of our knowledge to create a custom pattern generator using EduBlocks and Turtle
Can you remember all of the coding concepts that we learnt?
Lesson 6
Coding Concepts
Over the past five lessons we have learnt:
Lesson 6
Starting the project
Before we start the project we need to:
Lesson 6
Starting the game
Lesson 6
What happens if…?
If the player chooses to play, then any code inside the if condition is activated.
Inside the if condition we create a function to draw a star pattern.
If we run our code now, what will happen?
Note: Right now star does not have a parameter defined.
Lesson 6
Draw a circle
Here we create a function to draw a circle
But, what do we replace “?” with?
Is it the diameter of the circle?
The radius?
Or the circumference?
Lesson 6
What is the radius of a circle?
To set the radius of the circle…
Why do we want the value to be an integer?
Lesson 6
Draw 4 stars
Using a loop is a smart move
We can write code once, and run it many times
Here we set the Turtle pen colour to “red” and then “blue, in between we call the star function
Lesson 6
8 Circles
To draw 8 circles we use another for loop
We set the pen colour to green, and then call the circle function, using the data saved in the number variable
Lesson 6
Complete Code Listing
Here is all of the code in EduBlocks.
Your teacher will now open the code and can zoom in for clarity.
Can you alter the code to
Can you also add new features?
Lesson 6
What have we learnt?
Plenary
Congratulations!
You have successfully completed six lessons with EduBlocks, learn how to write Python code with blocks and be creative!
Next lesson, we’ll test our knowledge with an end of unit assessment
Plenary