WorksheetsVEX & Programming Review
Total questions: 27
Worksheet time: 14mins
This is a picture of which of the following?
VEX Motor
VEX Cortex
VEX Battery
Robot Motion Controller
Fill in the Blank: The _____________ responds to the touch of a user or object. With 0 meaning no touch and 1 meaning pressed in.
Ultrasonic Range Finder
Encoder
Limit Switch
Cortex
With 4095 degrees of movement, the ____________ allows the user to turn a gear on top of it to read how much this sensor has been spun.
Potentiometer
Encoder
Range Finder
Line Follower
Which VEX Sensor is picture here?
Line Tracker
Light Sensor
Encoder
Ultrasonic Range Finder
startMotor (leftmotor, 100);
stopMotor (leftmotor);
What will happen if the above code is run?
The Left Motor will spin at 100 speed
The Left Motor will spin at 100 speed for 1 second
The Left Motor will not visibly spin.
The Right Motor will spin at -100 speed
'If' is a conditional statement which checks a sensor for something to be ______________.
True or False
Left or Right
Short or Tall
Near or Far
'Else' is a conditional statement which is dependent upon an earlier _____________.
While Loop
If Statement
Debugger Window
Else Statement
What does the wait( ) command do?
Allows you to specify an amount of time, in seconds, for the program to run without interruption.
Allows you to specify an amount of time, in minutes, for the program to run without interruption.
Pauses all VEX movement for an amount of time, in seconds.
Pauses all VEX movement for an amount of time, in minutes.
What do curly braces do? { }
Surround commands which will be run.
Surround commands which will not be run
Separates Task Main from the rest of the code
Annoy students trying to code
Which of the following is NOT a digital sensor?
Bump Switch
Limit Switch
Encoder
Potentiometer
Where do you input the layout of your Cortex within ROBOTC to determine where each of your motors and sensors are plugged in?
Debugger Windows
Pragma Code
Motors and Sensors Setup
Variable and Function Pane
Which of the following commands is used to create loops in your program?
If
Else
Else If
While
Which keyword would you use to create a variable in ROBOTC?
int
var
let
void
Which keyword would you use to define a function in ROBOTC?
void
int
while
stopMotor
Which of the following is NOT considered a conditional (Boolean) statement in ROBOTC?
If
Else If
Else
startMotor
Which of the following commands would you use in ROBOTC to stop a motor?
stopMotor
startMotor
while
taskmain()
Conditional programming which uses symbols like == and >= are formally known as:
Boolean Logic
True or False Programs
Lie Detector Programs
Conditional Codes
while (SensorValue[bumpSwitch]==0)
What condition is the above while loop dependent on?
While the Limit Switch is pressed in
While the Bump Switch is pressed in
While the Bump Switch is untouched
While the Program is Running
Which of the following would you enter into a while() statement to make your program run forever?
SensorValue[limitSwitch]==1
motorcount < 365
1 != 1
1 == 1
What is most likely to happen based on the following code:
if (SensorValue(bumpSwitch) == 2)
{
startMotor(leftMotor, 130);
}
If the bumpSwitch is pressed in the leftMotor turns on
If the bumpSwitch is NOT pressed in the leftMotor turns on
Nothing
If the bumpSwitch and limitSwitch are pressed in the leftMotor turns on
Task Main, While Loops, and If & Else Statements all need which of the following at the beginning and end to work properly?
{ } Curly Braces
[ ] Straight Braces
( ) Parentheses
" " Quotation Marks
Which command waits for a bumper or limit switch to be pressed?
UntilDark
UntilLight
UntilTouch
Wait
The main purpose of robots in engineering is to:
Complete tasks humans find too mundane or too dangerous
Complete tasks that are oustanding
Complete tasks meant for humans so they can be replaced
Get that bread
What declaration is needed in every program we have run in ROBOTC?
While
If
startMotor
task main()
What is the maximum number a VEX Robotics motor can be spun at in ROBOTC?
155
88
365
127
In this window, you can see the current values of all motors and sensors:
Pragma Code
Debugger Window
Motors and Sensors Setup
Function Window
In this program: if (SensorValue(bump)==1) What does this statement describe.
A while loop which will be activated by the bump switch
An else statement controlled by the bump switch
An if statement controlled by the bump switch
A sensor value that increases by 1 each time.
