WorksheetsRobotics 1 - Advanced Programming Quiz
Total questions: 12
Worksheet time: 6mins
Name
Class
Date
1.
1. How does an ‘IF’ statement differ from a While loop?
a)
An IF statement is run once; a WHILE loop is run as long as the condition in the parentheses is true.
b)
A WHILE loop is always run once; An if Statement is run as long as the condition in the parentheses is true
c)
An IF statement can only be run while the condition is false; the WHILE loop can only be run as long as the condition is false
d)
An IF statement is always longer than a WHILE statement
2.
2. An IF-ELSE statement allows the robot to run two different portions of code at the same time.
a)
True
b)
False
3.
3. An IF-ELSE statement allows the robot to run one portion of code if the IF statement is false and another portion of code if it is true.
a)
True
b)
False
4.
4. If you only put an "IF" statement in the code, with our a "Forever" or "WHILE" loop, the program would:
a)
Run continuously
b)
Cause the robot to run straight forever
c)
Run the "IF" statement only once
d)
An IF statement will not run if it is not part of a WHILE loop
5.
5. When using time to control your "WHILE" loops, what do you need to do in order for each loop to count time independently?
a)
Use the "Reset Timer" block.
b)
Type in the correct program.
c)
Just type in the correct time and it will run for that amount of time, no matter what.
d)
There is no way to accomplish this task.
6.
6. When using an If Statement, when the condition is true:
a)
The commands directly under it are run forever
b)
The commands directly under it are run only once
c)
The commands directly under it are are skipped over
d)
The commands directly under it are skipped over and then checked again
7.
7. In an If-Else statement, the Else branch tells the robot specifically what to do if the condition is True
a)
True
b)
False
8.
8. The limit switch and bumper are ...
a)
Digital sensors that have a value of 1 or 0.
b)
Analog sensors that have a value of 1 or 0.
c)
Digital sensor that have a range of values, not just 1 or 0.
d)
Analog sensors that have a range of values, not just 1 or 0.
9.
9. A function or "My Block" allows you to:
a)
Use a sensor of your own design
b)
Use an analog sensor as a digital sensor
c)
Write a segment of code once, name it and then use it throughout the program
d)
Write a segment of code once and then use it under a different name throughout the program
10.
10. When using the joystick, you can disable it and enable the joystick...
a)
By turning the joystick on and off.
b)
By using the enable and disable controller block in the Controller section of the VEXcode V5 software.
c)
By unplugging the joystick from your robot.
d)
By shutting down the V5 software and then opening it back up again.
11.
11. The line followers and distance sensors are what type of sensors?
a)
Analog sensors that have a value of 1 or 0.
b)
Digital sensors that have a value of 1 or 0
c)
Analog sensors that have a range of values, not just 1 or 0.
d)
Digital sensors that have a range of values, not just 1 or 0.
12.
12. When programing a While loop, how does the condition work to run the code?
a)
The condition or statement must be false for the code to run properly.
b)
The condition or statement must be true for the code to run properly.
c)
The condition must be true and the statement must be false for the code to run properly.
d)
The code runs regardless of the condition or statement.
100 %
