Page 1 of 1

a) i. The program listed below is based around the Grey_bands background. The program is intended to make the simulated

Posted: Wed Apr 27, 2022 3:38 pm
by answerhappygod
a) i. The program listed below is based
around the Grey_bands background.
The program is intended to make the simulated robot drive
forward over each grey band. When it drives into a new grey band,
the robot will say aloud how many bands it has entered.
Using Python, Modify this program to:
1. Use the Coloured_bands background.
2. Continue to drive over all of the bands.
3. Count aloud how many bands it has entered whenever it enters
a non-white band.
4. Stop the robot after it drives forward over the black
band.
ii.Try running the program you have written for
part (i) using the Rainbow_bands background.
If your program does not run correctly, outline what the issue
is, and what you would have tochange to make your program run.
If your program does run correctly, outline how you have
achieved this. Discuss whether yourprogram would work on any
banding of colours.
iii.Provide one advantage of using Python
functions when writing longer programs. Outline a Pythonfunction
that prints out 'Hello World'.