wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

RobotC Review

Total questions: 20

Worksheet time: 19mins

Name
Class
Date
1.

In a ROBOTC program, this is an example of what?

a)

Complex behaviors

b)

Simple behaviors

c)

Basic behaviors

d)

Pseudocode

2.

What color are the comments in RobotC?

a)

red

b)

black

c)

blue

d)

green

3.

Which is an example of program comments; A or B?

a)

A

b)

B

4.

Which menu would you click on to add motors to your program?

a)

Motor and Sensor Set-up

b)

Firmware Download

c)

Compile Program

d)

Download to Robot

5.

Value of bump switch when pressed

a)

0

b)

1

c)

63

d)

127

6.

What is the purpose of the 'while(true)' statement?

a)

creates a finite loop to check for changes in your VEX components a number of times

b)

creates an infinite loop to check for mistakes in the program functions

c)

creates a finite loop to check for mistakes in the program functions

d)

creates an infinite loop to continually check for changes in your VEX components

7.

When is the while loop true?

a)

Never

b)

Always

c)

When hit bumpSwitch

d)

limitStwitch

8.

Which data type uses True or False and is useful for representing truth values of logic.

a)

Bounce

b)

Debugger

c)

Timers

d)

Boolean

9.

True or False: You can use a variable simply by putting its name where you want its value to be used

a)

True

b)

False

10.

Which are three main steps involved in using a variable?

a)

Introduce (create or “declare”) the variable

Give (“the assigned”) variable a name

Use the variable to access the stored value

b)

Introduce (create or “declare”) the variable

Use the variable to access the stored value

Give (“the assigned”) variable a name

c)

Give (“the assigned”) variable a name

Introduce (create or “declare”) the variable

Use the variable to access the stored value

11.

Normally, statements run only once, but with a __________, they can be told to repeat over and over for as long as you want

a)

while loop

b)

repeater

c)

duplicator

d)

infinity runner

12.

Limit and bump switches are what?

a)

Analog Sensors

b)

Motors

c)

Batteries

d)

Digital Sensors

13.

What do these instructions tell the robot to do?

a)

Move backwards for 63 seconds

b)

Move backwards for 2 seconds at half speed

c)

Turn in circles for for 2 seconds

d)

Wait 2 seconds before moving backwards 63 inches

14.

What do these instructions tell the robot to do?

a)

Make a left swing turn

b)

Make a left point turn

c)

Make a right swing turn

d)

Make a right point turn

15.

What do these instructions tell the robot to do?

a)

Make a left swing turn

b)

Make a left point turn

c)

Make a right swing turn

d)

Make a right point turn

16.

It used, in ROBOTC, to confirm that all inputs and outputs are working as expected

a)

Debugger

b)

Timers

c)

Comments

d)

Pseudocode

17.

Some punctuation comes in pairs, like parentheses () and curly braces {}. What will happen if one of the pair 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

18.

How would you fix the error on line 2 in this program?

a)

add “ { ” (open bracket)

b)

add “ } “ (closed bracket)

c)

line is not needed - delete line

d)

add a ‘ ; ” at the end of the line

19.

How would you fix the error on line 1 in this program?

a)

add “ { ” (open bracket)

b)

“task main” needs to be one word “taskmain”

c)

add “ ) “ (closed parenthesis)

d)

add a “ ; ” at the end of the line

20.

How would you fix the error on line 7 in this program?

a)

“stopMotor” needs to be “Stopmotor"

b)

should be written as (63, leftMotor)

c)

speed should be “127” instead of “63 “

d)

There is no speed when stopping a motor.