Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Robot C Review - Control Structures and Basic Commands

Total questions: 20

Worksheet time: 33mins

Name
Class
Date
1.
1.  What punctuation mark signals the end of a simple statement?    
a)
:
b)
)
c)
!
d)
;
2.
What is half speed value when we start a motor?
a)
63
b)
127
c)
100
d)
50
3.
Which one of these representations of Task Main will work in ROBOTC?
a)
Task main ()
b)
task main ()
c)
Taskmain ()
d)
task main;
4.

Which command means run time?

a)

wait

b)

stopMotor

c)

startMotor

5.
When you use a limit switch, which command would be used?
a)
untilTouch
b)
untilBump
c)
startMotor
d)
wait
6.

How do you make the following appear in your program?

a)

Compile program

b)

Download to robot

c)

Motor and Sensor SetUp

d)

Robot-Compiler Target

7.

In RobotC each { must have a } ?

a)

True

b)

False

8.

What happens if one paired punctuation such as parantheses are missing?

a)

the robot will assume that it is there and continue running

b)

the program will not compile and the programmer will see an error message

c)

the program will skip the statement

d)

the program will delete the paired punctuation that is not missing

9.

Identify the line in which the error exists in the program.

a)

line 10

b)

line 11

c)

line 12

d)

line 13

e)

line 14

10.

Find the error in this code.


turnLEDOff(red);

turnLEDOff(yellow)

turnLEDOff(green);

turnLEDOn(red);

untilTouch(touchSensor);

turnLEDOff(red);

a)

Missing a parameter

b)

Missing a semicolon

c)

Reversed parameters

d)

Wrong notation for name of sensor/command

11.

What is this VEX Robot part?

a)

Spur Gear

b)

Bump Switch

c)

Vex Motor

d)

Vex Cortex

12.
What is this VEX Robot part?
a)
Bearing Plate
b)
Collar Shaft
c)
Cortex
d)
Spur Gear
13.

What is this VEX Robot part?

a)

Vex Motor

b)

Vex Motor Controller

c)

Vex Bump Switch

d)

Vex Extension Cord

14.
Which part
do we write
codes?
a)
1
b)
2
c)
3
d)
4
15.

If you want to repeat your code forever, what should go inside the circled parentheses?

a)

1 == 1

b)

1 = 1

c)

1 > 2

d)

1

16.

Where should the "If statement" of a code go in Robot C?

a)

1

b)

2

c)

3

d)

4

e)

5

17.

Where should the "Else Statement" go in Robot C?

a)

4

b)

5

c)

6

d)

7

e)

8

18.

What is the error is shown in the image?

a)

The programmer forgot to do the Motor and Sensor setup

b)

The programmer forgot some punctuation

c)

The programmer forgot to add an If, Else statement

d)

The programmer forgot to compile the program

19.

If there are NO errors in your code, but the program is not running on your robot, what should you do next? (2 correct answers!)

a)

Check that the wiring matches the Motor and Sensor setup

b)

Give up and close your computer

c)

Check that your robot is turned on

d)

Delete the code and write the whole thing again

e)

Change the names of your motors and sensors in Motor and Sensor setup

20.

Everyone can learn how to code.

a)

True

b)

False