New game
Download
Get Academic Plan
Share game
Integrate it into your platform

You can integrate the game into an LMS compatible with LTI 1.1 or LTI 1.3 such as Canvas, Moodle, or Blackboard. This way, the scores will be automatically saved into the platform’s gradebook.
Download
You have exceeded the maximum number of games you can integrate into Google Classroom with your current Plan.

To integrate as many games as you want in Google Classroom, you need an Academic Plan or a Commercial Plan.

You have exceeded the maximum number of games you can integrate into Microsoft Teams with your current Plan.

To integrate as many games as you want in Microsoft Teams, you need an Academic Plan or a Commercial Plan.

Downloading games is an exclusive feature for users with an Academic Plan or a Commercial Plan.

Get your Academic Plan or your Commercial Plan now and start integrating your games into your LMS, website or blog.

If you wish, you can download a demo game here and test its integration:

CodeMonkey: Loops & Functions

Slideshow

Played 0

About this activity

Loops and functions basics for grade 6

Created by

Bhutan

Download the paper version to play

Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

%
Anonymous
Anonymous
%
%
%
You have exceeded the maximum number of games you can print with your current Plan.

To print as many games as you want, you need an Academic Plan or a Commercial Plan.

Print your game
CodeMonkey: Loops & Functions
 

CodeMonkey: Loops & FunctionsOnline version

Loops and functions basics for grade 6

by Sither Tshering
1

Slide 1: What are loops?

In CodeMonkey, loops repeat code blocks. A loop helps you perform actions many times without writing each line again.

Common types: for loops and while loops.

2

Slide 2: The For Loop

A for loop runs a block a set number of times. It uses an index variable, like i, to count.

Example: for i from 1 to 5.

3

Slide 3: The While Loop

A while loop repeats while a condition is true. It continues until the condition becomes false.

Be careful to avoid infinite loops.

4

Slide 4: Loop Practice

Use loops to move a character across the screen, one step at a time, until it reaches the edge.

Think about conditions and limits.

5

Slide 5: What are Functions?

A function groups code into a reusable block. It performs a task and can return a value.

Functions help organize programs.

6

Slide 6: Parameters and Return

Functions can take parameters to customize behavior. They can also return a value after finishing.

Example: addTwoNumbers(a, b) → a + b.

7

Slide 7: Function Call

To use a function, you call it by name and pass arguments. The function runs and gives a result.

Keep your calls clear and consistent.

8

Slide 8: Scope & Cadence

Variables inside a function have local scope. Outside, they stay separate. This prevents conflicts.

Plan your code structure well.

9

Slide 9: Debugging Loops

Check loop conditions, increments, and boundaries. Look for off-by-one errors and ensure the loop ends.

Use print statements to trace values.

10

Slide 10: Mini Challenge

Write a loop to count to 10, and a function to square numbers. Call your function with several values and observe results.

Experiment and have fun with CodeMonkey!

Are you sure you want to leave the page?

If you leave, you will lose the game in progress.