NEW
Font size
WorksheetsRobotC Review
Total questions: 20
Worksheet time: 19mins
In a ROBOTC program, this is an example of what?
Complex behaviors
Simple behaviors
Basic behaviors
Pseudocode
What color are the comments in RobotC?
red
black
blue
green
Which is an example of program comments; A or B?
A
B
Which menu would you click on to add motors to your program?
Motor and Sensor Set-up
Firmware Download
Compile Program
Download to Robot
Value of bump switch when pressed
0
1
63
127
What is the purpose of the 'while(true)' statement?
creates a finite loop to check for changes in your VEX components a number of times
creates an infinite loop to check for mistakes in the program functions
creates a finite loop to check for mistakes in the program functions
creates an infinite loop to continually check for changes in your VEX components
When is the while loop true?
Never
Always
When hit bumpSwitch
limitStwitch
Which data type uses True or False and is useful for representing truth values of logic.
Bounce
Debugger
Timers
Boolean
True or False: You can use a variable simply by putting its name where you want its value to be used
True
False
Which are three main steps involved in using a variable?
Introduce (create or “declare”) the variable
Give (“the assigned”) variable a name
Use the variable to access the stored value
Introduce (create or “declare”) the variable
Use the variable to access the stored value
Give (“the assigned”) variable a name
Give (“the assigned”) variable a name
Introduce (create or “declare”) the variable
Use the variable to access the stored value
Normally, statements run only once, but with a __________, they can be told to repeat over and over for as long as you want
while loop
repeater
duplicator
infinity runner
Limit and bump switches are what?
Analog Sensors
Motors
Batteries
Digital Sensors
What do these instructions tell the robot to do?
Move backwards for 63 seconds
Move backwards for 2 seconds at half speed
Turn in circles for for 2 seconds
Wait 2 seconds before moving backwards 63 inches
What do these instructions tell the robot to do?
Make a left swing turn
Make a left point turn
Make a right swing turn
Make a right point turn
What do these instructions tell the robot to do?
Make a left swing turn
Make a left point turn
Make a right swing turn
Make a right point turn
It used, in ROBOTC, to confirm that all inputs and outputs are working as expected
Debugger
Timers
Comments
Pseudocode
Some punctuation comes in pairs, like parentheses () and curly braces {}. What will happen if one of the pair are missing?
the robot will assume that it is there and continue running
the program will not compile and the programmer will see an error message
the program will skip the statement
the program will delete the paired punctuation that is not missing
How would you fix the error on line 2 in this program?
add “ { ” (open bracket)
add “ } “ (closed bracket)
line is not needed - delete line
add a ‘ ; ” at the end of the line
How would you fix the error on line 1 in this program?
add “ { ” (open bracket)
“task main” needs to be one word “taskmain”
add “ ) “ (closed parenthesis)
add a “ ; ” at the end of the line
How would you fix the error on line 7 in this program?
“stopMotor” needs to be “Stopmotor"
should be written as (63, leftMotor)
speed should be “127” instead of “63 “
There is no speed when stopping a motor.
