Page 32 - Touchcode_C7_Flipbook
P. 32
E. Answer the following questions:
1. What are the benefits of using sequences in coding?
.............................................................................................................................................................
.............................................................................................................................................................
2. Write an algorithm to swap two numbers.
.............................................................................................................................................................
.............................................................................................................................................................
3. Write down two advantages of the loop.
.............................................................................................................................................................
.............................................................................................................................................................
4. Write one difference between While loop and For loop.
.............................................................................................................................................................
.............................................................................................................................................................
5. What do you mean by iteration?
.............................................................................................................................................................
.............................................................................................................................................................
Experiential Learning
Applied Project
Chase the apple
In this task, you will create a game with two sprites, one will be a player sprite and another
will be an apple sprite.
Objective:
To chase and catch the apple and collect as many points as possible before the time runs out.
Every time the apple is caught, points are added, and the timer is restored.
To perform the task, follow these steps:
Step 1: Visit the link: https://
arcade.makecode.
com/. Click on ‘New
Project’. Write the
name of the project
‘Chase the Apple’, and
click on ‘Create’.
Step 2: From the Scene toolbar, select the ‘set background image’ block and Move the ‘set
background image’ block to ‘on start’ block.
30 Touchcode-VII

