Computer Printots Chapter 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

TECHNOS CHOOL Robo Programming

Robo Programming
ANSWER KEY

Formative Assessment

I. State True or False.

1. You cannot move the robot from its home position. F

2. A Robot can also paint. T

3. A Robot can turn its head to east and move. T

4. A Robot cannot move backward. F

5. You can paint in black and white colors using the robot. T

6. Repeat command can also be used to define an indefinite loop. T

II. Rearrange the jumbled letters.


1. W O R D FA R - FORWARD
2. O B R T O - ROBOT
3. S E W T - WEST
4. T I N A P - PAINT
5. B A R G - GRAB
6. T E A R E P - REPEAT

Pearl Series Book 4

1
TECHNOS CHOOL Robo Programming

Summative Assessment

III. Answer the following questions.


1. What happens when you execute the paintBlack() command?
When we execute the paintBlack() command, the Robo puts the brush with black paint
to the ground.
2. Name the command used to perform the action shown in the figure given below.

PaintWhite()

Forward(2)

3. Observe the sequence of pictures given below and find out the action that is carried out
by the robot. Name the command and its uses.

Figure 1 Figure 2 Figure 3 Figure 4

EatUp() Command – It banishes the beacon which was picked up and it can
never be put down again. It is like deleting the beacon and you cannot recover it
again.

4. State the uses of the Repeat command.


Repeat command is used to repeat a set of instructions ‘n’ number of times.

Pearl Series Book 4

2
TECHNOS CHOOL Robo Programming

1. Open up the defaultmap in Robomind and draw a square as shown in the


screenshots. Use move and paint commands.

Forward (2)
Repeat(4)
{
Right
Paintwhite
Forward (1)
Paintblack
Forward (1)
Paintwhite
Forward (1)
}

Pearl Series Book 4

3
TECHNOS CHOOL Robo Programming

More Activities

What will happen Next?


What command was given
What will happen next?
to the ROBO?

Robo will Pickup Pickup()


the beacon

What command should be What command should be


given to make the robo stop given to make the robo
painting? paint in black?

StopPainting() PaintBlack()

By looking at the picture on the left, what do you think


that the robo can possibly perform next?

EatUp()
Forward()

How many commands should be given to make the robo


find the white spots?

The robo should be given Forward and


Right command to find all the white spots

Pearl Series Book 4

4
TECHNOS CHOOL Robo Programming

Robo Environment

1. How many white spots are there in the map shown above?

2. What is the name of the green object in the map?


Beacon

3. How many steps should the robo move to find the white spot that is at the
top right corner of the map?

11 Steps

4. What commands should be given to move the robo in front of the beacon?

Pickup() / Eatup()

Pearl Series Book 4

5
TECHNOS CHOOL Robo Programming

Alphabets with Robo

This is a program to draw a black square. Observe the program and write scripts to
write the letter A and Z as shown.

Note: paintWhite() is the command to make the Robo paint in While color and
stopPainting() is the command to make the Robo stop painting.

Pearl Series Book 4

6
TECHNOS CHOOL Robo Programming

Eat up the Beacons


The Grab commands in Robomind are:
❖ pickUp() – the Robo can pick one beacon at a time

❖ putDown() – the Robo drops the beacon that was picked up

❖ eatUp() – destroys the beacon by picking it up and swallowing

Pick the beacons and eat them up thereby clearing the way towards the white spot.
❖ Open passbeacons.map

❖ You can see from the left, a Robo, then beacons and a white spot at the right.

❖ The task is to move the Robo from the left to the white spot on the right.

Start set up:

Output screen:

Pearl Series Book 4

7
TECHNOS CHOOL Robo Programming

Controller
Each button in remote controller has been assigned with a letter or a number. Take a keen
look at the World Panel and write the appropriate letter/number that will cause the action in
World Panel starting from the white area.

forward(1)
forward(1) The letter/number that will help
paintWhite in creating S in World Panel is -
forward(1) BBGB1BBB1BB1BBB34BB3B
left BB3B
forward(1)
forward(1)
forward(1)
left
forward(1)
forward(1)
left
forward(1)
forward(1)
forward(1)
right
paintBlack
forward(1)
forward(1)
right
forward(1)
forward(1)
forward(1)
right
forward(1)

40
TECHNOS CHOOL Robo Programming

Coders
Write code in Robomind for the output given below.

Use only direction commands Use only movement commands

right backward (1)


left forward (1)
left forward (2)
left forward (2)
left forward (3)
left forward (3)
left forward (4)
left forward (4)
left forward(5)
forward (5)

paintwhite
backward (1)
right
forward (1)
left
Pearl Series
forward (2) Book 4
left
forward (2)
left
forward (3)
left
forward (3)
left 41
forward (4)
left
TECHNOS CHOOL Robo Programming

Beacons
The before and after picture of passBeacons.map suggest that the robo has deleted
all the beacons using one of the grab commands. Identify the command and write
code for the robo to perform the same action.
BEFORE AFTER

Right
Forward(2)
Repeat(7)
{
Eatup
Forward(1)
}
Forward(2)

Pearl Series Book 4

42

You might also like