G6 Notes
G6 Notes
G6 Notes
Notes Grade 6
Topic : Module
Learning Objective:
How to use modules to simplify a program
Success criteria:
● Define upload?
Keywords:
upload..
Edit
Coordinate
Gift script:
Set the x/y coordinate of the gift to -25 and 150.
That will put it at the end of the maze.
If you use different maze you may need different values.
Sense if the frog touches the maze wall
Question to think:
1. What is module?
2. What are advantages of module?
3. How modules work?
4. Define a module
5. Create a simple module
6. Create a module using commands with arrows
7.
__________________________________________________________________
Adding the Maze:
Learning Objective:
How to use modules to simplify a program
Success criteria:
Students will be able to:
● Define what is module?
● What is advantages of module?
● How module work?
Keywords:
Module
Introduction:
A module stores a set of command. The module has a name chosen by the
programmer.
A programmer can use the module in their programs. When computer sees
the name of module in the program, it will carry out all command stores in
the module.
In some programming language, modules are called procedures or function.
Advantages:
It makes program shorter and easier to read.
Programmer can use module in more than one part of their program. That
saves time and effort
Can share with other programmers that make everyone’s work easier.
Startup:
Startup: to store all the commands that come before the loop in this module
Endgame:
Endgame: to store all the commands from the end of the game.
Question to think:
8. Define upload?
9. Define edit?
10.What is coordinates?
Activities:
Here are three different module. Each module store different commands.
Modules are X ,Y and Z
The student wants to make the spaceship jump to a random place on the
screen. Which module should she used
The students want to make the spaceship jump to a random place when the
user presses the spacebar. What would the script look like. Either describe
the script in words or say what block you would use.
Suggest better name for each module.
MOVEMENT MODULE
Learning Objective:
To explain how to store commands in modules
Success criteria:
Students will be able to:
● Define a module
● Create a simple module
● Create a module using commands with arrows
Keywords:
Module
X coordinate
Y coordinate
Introduction:
The position of frog on the screen is set by x/y coordinates
When you press the up arrow , the value of y coordinate is increase by 10.
The four movement block you made take up a lot of space. The frog script is
very big.
To make script smaller and easier to read, you will make a command. This
module will store all the movement commands
Choose the name of module carefully.
Choose a name that reminds you what commands are stored in the module.
Question to think:
Different keys will have different effects how
what is the value of y and x coordinate of key press?
list the name of key press?