wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PLTW POE 3.1 Machine Control Review RobotC

Total questions: 209

Worksheet time: 2hrs 52mins

Name
Class
Date
1.
A step-by-step procedure for solving a problem or accomplishing some end, especially by a computer.
a)
Closed Loop System
b)
Bumper Switch
c)
Algorithm
2.
of the surrounding area or environment
a)
Ambient
b)
Algorithm
c)
Analog to Digital
3.
A signal having the characteristic of being continuous and changing smoothly over a given range, rather than switching suddenly between certain levels.
a)
Analog Signal
b)
Closed Loop Systerm
c)
Bumper Switch
4.
Conversion of an analog signal to a digital quantity such as binary.
a)
Data
b)
Algorithm
c)
Analog to Digital
5.

a type of touch sensor for the VEX. Due to its size and construction, it is better suited for tasks such as wall detection.

a)

Algorithm

b)

Bumper Switch

c)

Data

6.
A control system that considers the output of a system and makes adjustments based on that output.
a)
Closed Loop System
b)
Analog to Digital
c)
Ambient
7.
Information encoded in a digital form, which is usually stored in an assigned address of a data memory for later use by the processor.
a)
Data
b)
debugger
c)
Digital Signal
8.
a computer program that assists in the detection and correction of errors in computer programs.
a)
Digital Signal
b)
Data
c)
debugger
9.
A system of discrete states: high or low, on or off, 1 or 0.
a)
Data
b)
Digital Signal
c)
Algorithm
10.
Conversion of a digital signal to its analog equivalent, such as a voltage.
a)
Feedback
b)
Data
c)
Digital to Analog
11.
The return to the input of a part of the output of a machine, system, or process (as for producing changes in an electronic circuit that improve performance or in an automatic control device that provide self-corrective action).
a)
Digital Signal
b)
Feedback
c)
Data
12.

an array of 4 LEDs that helps your robot light the way

a)

Flashlight

b)

Data

c)

debugger

13.
A diagram that shows step-by-step progression through a procedure or system especially using connecting lines and a set of conventional symbols.
a)
Limit Switch
b)
Flowchart
c)
Flashlight
14.

Information fed into a data processing system or computer.

a)

Interface

b)

Limit Switch

c)

Input

15.
The place at which independent and often unrelated systems meet and act on or communicate with each other.
a)
Line Tracking Sensor
b)
Flowchart
c)
Interface
16.

allows the robot to sense the ambient light in a room.

a)

Flashlight

b)

Light Sensor

c)

Limit Switch

17.

another form of touch sensor for VEX. It is more suited for detecting smaller motions that might not trigger the bumper sensor.

a)

Limit Switch

b)

Line Tracking Sensor

c)

Flowchart

18.

allows the robot to tell objects or surfaces apart based on how dark or light they are. It shines a beam of infrared light out onto the object, and measures how much light is reflected back.

a)

Optical Encoder

b)

Line Tracking Sensor

c)

Potentiometer

19.
The central processing unit that is generally made from a single integrated circuit.
a)
Microprocessor
b)
Data
c)
Output
20.
The contact of a relay that is closed when the coil is de-energized.
a)
Open Loop System
b)
Normally Open
c)
Normally Closed
21.
The contact of a relay that is open when the coil is de-energized.
a)
Normally Open
b)
Normally Closed
c)
Open Loop System
22.
A control circuit in which the system output has no effect on the control.
a)
Normally Closed
b)
Normally Open
c)
Open Loop System
23.

detects the rotation of an axle that passes through it. It has a resolution of 360 counts per revolution (2 count intervals), and can distinguish between clockwise and counterclockwise rotation.

a)

Potentiometers

b)

Optical Encoder

c)

Limit Switch

24.
The information produced by a computer.
a)
Output
b)
Input
c)
Normally Open
25.

used to measure the angular position of the axle or shaft passed through its center.

a)

Potentiometers

b)

Limit Switch

c)

Bumper Switch

26.
A device that responds to a physical stimulus (as heat, light, sound, pressure, magnetism, or a particular motion) and transmits a resulting impulse (as for measurement or operating a control).
a)
Microprocessor
b)
Subroutine
c)
Sensor
27.
rotates its shaft to a set angular position, between 0 and 120 degrees.
a)
Switch
b)
Servo Motor
c)
Limit Switch
28.
A subordinate routine; specifically, a sequence of computer instructions for performing a specified task that can be used repeatedly.
a)
Microprocessor
b)
Norally Closed
c)
Subroutine
29.
A device for making, breaking, or changing the connections in an electrical circuit.
a)
Switch
b)
mircroprocessor
c)
Servo Motor
30.

By emitting an ultrasonic pulse and timing how long it takes to hear an echo,it can accurately estimate how far away the object is.

a)

Potentiometers

b)

Light Sensor

c)

Ultrasonic Range Finder

31.

Analog sensor senses ambient light in the room; returns values in range of 0 to 4095.

a)

Limit Switch

b)

Light Sensor

c)

Bumper Switch

d)

Reed Sensor

32.

Digital sensor; returns distance values between 0 and 255 inches; uses sonar

a)

Ultrasonic Rangefinder

b)

Light Sensor

c)

Shaft Encoder

d)

Bumper Switch

33.

A switch that can provide variable motion control (rotational). It can vary the resistance within the switch, which affects both the current and voltage flowing out of the switch.

a)

Limit Switch

b)

Sensor

c)

Potentiometer

d)

Analog Signal

34.

A digital Vex touch sensor best suited to smaller motions that might not be triggered by the bumper sensor.

a)

Reed Switch

b)

Light Sensor

c)

Bumper Switch

d)

Limit Switch

35.

A specialized digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or lighting fixtures.

a)

Analog Signal

b)

Potentiometer

c)

Cortex or Programmable Logic Controller

d)

Analog Signal

36.

Programming can be done in real time.

a)

Open loop system

b)

Closed loop system

c)

Boolean

d)

Data

37.

A digital Vex touch sensor best suited to tasks such as wall detection.

a)

Limit Switch

b)

Bumper Switch

c)

Reed Switch

d)

Potentiometer

38.

Coding where a single input creates a continuous output.

a)

Open loop system

b)

Closed Loop System

c)

Data

d)

Analog Signal

39.

"Plain english" computer program that is written in green on RobotC, intended for human reading rather than machine.

a)

Boolean

b)

Subroutine

c)

Pseudocode

d)

Limit Switch

40.

A diagram that shows step-by-step progression through a procedure using connecting lines and a set of conventional symbols.

a)

Flowchart

b)

Data

c)

Sensor

d)

Loop System

41.

Similar appearance to a motor; rotates to a position between 0 to 120 degree; Does not spin continuously

a)

Motor

b)

Servo

c)

Potentiometer

d)

Reed Switch

42.
a computer program that assists in the detection and correction of errors in computer programs.
a)
Digital Signal
b)
Data
c)
debugger
43.

an array of 4 LEDs that helps your robot light the way

a)

Flashlight

b)

Data

c)

debugger

44.
Which command means turn on motor?
a)
wait
b)
startMotor
c)
stopMotor
45.

In the command, wait(9); the 9 represents what value?

a)

Speed of the motor

b)

Time of the motor running

c)

Time between tasks

46.

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

47.
What does it mean when a command appears in color when typed in ROBOTC?
a)
The command is typed incorrectly
b)
The command is not allowed in the command
c)
ROBOTC recognizes the command as an important keyword
d)
It is highlighted so the programmer should look at the word or name carefully 
48.
1.  What punctuation mark signals the end of a simple statement?    
a)
:
b)
)
c)
!
d)
;
49.
When is the while loop true?
a)
Never
b)
Always
c)
When hit bumpswitch
d)
When hit Limitswitch
50.
What category in Natural Language would you find the commands for the LEDs and Flashlight?
a)
Movement
b)
Behaviors
c)
Special 
d)
Control Structures
51.
How many analog ports?
a)
6
b)
8
c)
10
d)
12
52.
How many digital ports?
a)
6
b)
8
c)
10
d)
12
53.
The sonar can measure in 
a)
mm
b)
cm
c)
in
d)
all of these
54.
Value of bump switch when pressed
a)
0
b)
1
c)
63
d)
127
55.
The speed of motor is affected by battery power. 
a)
True
b)
False
56.
How do we make a program loop indefinitely? 
a)
if/else statements
b)
task main ()
c)
while (1==1)
d)
SensorValue ()
57.
What is half speed value when we start a motor?
a)
63
b)
127
c)
100
d)
50
58.

All of these are digital sensors except?

a)

bumpswitch

b)

light sensor

c)

shaft encoder

d)

ultrasonic range finder

59.

The value range associated with the limit switch is?

a)

-127 to 127

b)

0 to 127

c)

-1 to 1

d)

0 or 1

60.

An axle in your optical shaft encoder rotated exactly 1 revolution. How can you know this by looking at sensor data?

a)

it changed from 0 to 1

b)

it increased by 3.14 times

c)

it shows a change of 360

d)

it can't be known by looking at the data

61.

One of the first things you should do every day after opening the ROBOTC software is:

a)

check my texts & Instagram when I think the teacher isn't looking and send a selfie to my BFF

b)

pat my head and rub my tummy at the same time

c)

check the student splash page to see if I've won the lottery

d)

update the firmware

62.

Comments in ROBOTC are what color text?

a)

Blue

b)

Green

c)

Orange

d)

Red

63.

This shape represents what in a flowchart?

a)

Decision

b)

Process

c)

Input/Output

d)

Start or Stop

64.

A motor can be reversed by_____________.

a)

Standing on my head and looking at the motor upside down

b)

changing the sign (+/-) of the speed in the program

c)

Check "Reverse" in Motors & Setup

d)

turn the motor with my LEFT hand instead of my right hand

65.

Which battery condition allows the fastest motor rotation?

a)

50% charged

b)

75% charged

c)

100% charged

d)

charged to my credit card

66.

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

67.

Which statement below best describes a potentiometer?

a)

It can turn up to 12 full revolutions

b)

Measures rotation of a shaft

between 0 and ~265 degrees

c)

Excess torque against the internal mechanical stops will not harm them

d)

It measures potential energy

68.

Which of the following are true for the Ultra Sonic Range Finder?

a)

It works similar to how bats and submarines

sense distance

b)

Returns values of -1 or -2 if used outside of this range or if a return signal is not sensed

c)

Is an analog sensor

d)

It returns distance values between 0 and 255 inches or the equivalent centimeters or millimeters

69.

This sensor can control the distance which a robot moves by monitoring the angle at which the wheels attached to the shaft encoder spin. Which sensor is it?

a)

Flashlight

b)

Motors

c)

Potentiometer

d)

Optical Shaft Encoders

70.

The line follower prefers what color to operate?

a)

White

b)

Black

c)

Yellow

d)

Sky Blue

71.

I use pseudocode & comments in my program because _____.

a)

my teacher is mean and makes me do it.

b)

I follow sound best practices and know it can help me or a teammate save time in the future.

c)

I just like to do pseudo - anything

d)

my teacher won't let us program a poem.

72.

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

a)

Debugger

b)

Timers

c)

Comments

d)

Pseudocode

73.

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

a)

Bounce

b)

Debugger

c)

Timers

d)

Boolean

74.

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 a finite loop to check for changes in your VEX components a number of times

c)

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

75.

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

76.

True or False: The current value of the variable will be used every time the variable appears

a)

True

b)

False

77.

How do we make a program loop indefinitely?

a)

if/else statements

b)

task main ()

c)

while (1==1)

d)

SensorValue ()

78.

Which is NOT an acceptable example of an infinite loop?

a)

while(true)

b)

while(1==1)

c)

while(not false)

79.

What speed is this program running?

a)

Full Speed

b)

Half speed

80.

A program is

a)

A logical and step-by-step set of directions for the robot to follow.

b)

A logical and step-by-step set of directions for the programmer to follow.

c)

A set of directions, written in paragraph form, that even a robot can follow.

81.

True or False: The role of the robot is to carry out the plan by following the steps in the program.

a)

True

b)

False

82.

When is the while loop true?

a)

Never

b)

Always

c)

When hit bumpSwitch

d)

limitStwitch

83.

Value of bump switch when pressed

a)

0

b)

1

c)

63

d)

127

84.

A motor can be reversed by_____________.

(multi-answer)

a)

Standing on my head and looking at the motor upside down

b)

Flipping the polarity (+/-) at the connection to the cortex microcontroller

c)

Check "Reverse" in Motors & Setup Pragma

d)

turn the motor with my LEFT hand instead of my right hand

85.

The following statement is an example of what kind of behavior: "startMotor (port2, 127);"

a)

Complex behavior

b)

Simple behavior

c)

Basic behavior

86.

The following statement is an example of what kind of behavior: "Turn on both motors at full speed"

a)

Complex behavior

b)

Simple behavior

c)

Basic behavior

87.

What will happen in this program?

a)

Robot will turn left

b)

Robot will turn right

c)

robot will move forward for 2 seconds

d)

Robot will move backward for 2 seconds

88.

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

a)

Complex behaviors

b)

Simple behaviors

c)

Basic behaviors

d)

Pseudocode

89.

True or False: Comments are used to make notes for the human programmers

a)

True

b)

False

90.

True or False: Program comments will be read as code and executed by ROBOTC.

a)

True

b)

False

91.

Limit and bump switches are what?

a)

Analog Sensors

b)

Motors

c)

Batteries

d)

Digital Sensors

92.

What does it mean when a command appears in color when typed in ROBOTC?

a)

command is not allowed

b)

command is typed incorrectly

c)

ROBOTC recognizes the command as an important keyword

93.

Every time you open ROBOTC on your computer desktop, you should check for these things... Which is the correct path to follow?

a)

Robot > Platform type > VEX 2.0 Cortex and Natural Language PLTW; Robot > VEX Cortex Communication Mode > USB Only

b)

Robot > Compile Program; Robot > VEX Communication Mode > VEX net or USB; View > Font Increase

c)

Robot > Compiler Target > Physical Robot; Robot > VEX Cortex Communication Mode > Competition VEXnet

94.

ROBOTC is a _________________ programming language based on the standard C programming language.

a)

message

b)

text-based

c)

data

d)

conditional

95.

Text written as part of a program is called _______

a)

byte

b)

bitmap

c)

function

d)

code

96.

You type code just like normal text, but you must keep in mind that ___________________ is important to the computer. Replacing a lowercase letter with a capital letter or a capital letter with lowercase, will cause the robot to become confused.

a)

spaces

b)

capitalization

c)

letters

d)

numbers

97.

3000 milliseconds is the same as

a)

3 minutes

b)

3 hours

c)

3 seconds

d)

3ml

98.

Statements run in English reading order. As soon as one command is complete, the next runs.

a)

(right-to-left, top-to-bottom).

b)

(left-to-right, bottom-to-top).

c)

(left-to-right, top-to-bottom).

d)

(right-to-left, bottom-to-top).

99.

When the program runs out of statements and reaches the ____ symbol in task main, all motors stop, and the program ends.

a)

]

b)

;

c)

{

d)

}

100.

How does RobotC know where one statement ended and the other began?

a)

It knows because of the semicolon at the end of each line.

b)

It knows because of the curly brackets at the end of each line.

c)

It knows because of the square brackets at the end of each line.

d)

It knows because of the bracket at the end of each line.

101.

Every __________________ ends with a semicolon. It’s like the period at the end of a sentence.

a)

sentence

b)

code

c)

statement

d)

option

102.

Every punctuation pair consists of an “_______” punctuation mark and a “________” punctuation mark.

a)

"first" "last"

b)

"starter" "ending"

c)

"initial" "ending"

d)

"opening" "closing"

103.

Different commands make use of different punctuation. The motor command uses square brackets and the wait1Msec command uses _____________.

a)

curly brackets

b)

parentheses

c)

square brackets

d)

semi-colon

104.

Simple statements can only run one after another in order, but __________ statements allow the program to choose the order that statements are run.

a)

command

b)

instructional

c)

running

d)

control

105.

The control structure “___________” directs the program to the main body of the code. When you press “Start” or “Run” on the robot, the program immediately goes to task main and runs its code.

a)

task main

b)

starting up

c)

main body

d)

body start

106.

The left and right curly braces { } belong to the_________structure. They surround the commands which will be run in the program

a)

running

b)

main body

c)

command

d)

task main

107.

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

108.

Control structures like ________ decide which lines of code are run, and when. They control the “flow” of your program, and are vital to your robot’s ability to make decisions and respond intelligently to its environment.

a)

task main

b)

run

c)

main body

d)

main command

109.

For this, ROBOTC allows “comments” to be made. It starts with _____

a)

"

b)

(

c)

//

d)

[

110.

Punctuation, both single like semicolons and paired like parentheses, are used to set apart important parts of ___________

a)

words

b)

sentences

c)

commands

d)

paragraphs

111.

ROBOTC automatically _________ key words that it recognizes

a)

counts

b)

weighs

c)

colors

d)

marks

112.

Spaces, tabs, and line breaks are generally unimportant to ROBOTC and the robot. True or False

a)

True

b)

False

c)

Sometimes true

d)

Always False

113.

Statements are commands to the robot. Each statement e is also usually written on its own line to make it ________.

a)

easier for the robot to read

b)

organized

c)

neat

d)

easier for humans to read.

114.

1. A program is

a)

A logical and step-by-step set of directions for the robot to follow.

b)

A logical and step-by-step set of directions for the programmer to follow.

c)

A set of directions, written in paragraph form, that even a robot can follow.

d)

D. None of the answers are correct.

115.

2. True or False: The role of the robot is to carry out the plan by following the steps in the program.

a)

True

b)

False

c)

Sometimes true

d)

Always false

116.

Pseudocode is

a)

A false code

b)

A code, written in English, that the robot can understand.

c)

A code, written in binary language, that the robot can understand.

d)

A set of basic steps that the human can use to plan the program.

117.

________ are a convenient way to talk about what the robot is doing and what it must do to carry out the plan created by the programmer.

a)

Operations

b)

Actions

c)

Behaviors

d)

Instructions

118.

Which of the following is a reason that programmers use pseudocode?

a)

It keeps the plan for the program organized.

b)

Writing out the exact code commands takes too much time.

c)

It allows people who can’t read code to understand the plan for the program.

d)

All of the answers are true.

119.

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

a)

Complex behaviors

b)

Simple behaviors

c)

Basic behaviors

d)

Pseudocode

120.

What color are the comments in RobotC?

a)

red

b)

black

c)

blue

d)

green

121.

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

a)

A

b)

B

122.

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

123.

Value of bump switch when pressed

a)

0

b)

1

c)

63

d)

127

124.

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

125.

When is the while loop true?

a)

Never

b)

Always

c)

When hit bumpSwitch

d)

limitStwitch

126.

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

a)

Bounce

b)

Debugger

c)

Timers

d)

Boolean

127.

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

128.

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

129.

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

130.

Limit and bump switches are what?

a)

Analog Sensors

b)

Motors

c)

Batteries

d)

Digital Sensors

131.

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

132.

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

133.

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

134.

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

a)

Debugger

b)

Timers

c)

Comments

d)

Pseudocode

135.

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

136.

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

137.

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

138.

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.

139.

What does every top to bottom ROBOTC program have to have?

a)

task main( ) and a set of { }

b)

task main and a set of ( )

c)

main task and a set { }

d)

task main and a set of [ ]

140.

Simple ROBOTC command lines always end with a

a)

}

b)

)

c)

semi-colon

d)

]

141.

The most important thing to do when troubleshooting compiled code is:

(multi-answer)

a)

make sure each line has a semicolon(;) at the end

b)

make sure commands are in camalCase

c)

check that all the comments are correct descriptions

d)

check your syntax (programming language)

142.

Which of the following statements are true about comments?

a)

Comments are used by programmers to make notes in their codes

b)

It cuts down on potential confusion when someone else may read the code

c)

The compiler and robot both ignore comments when running the program

d)

All of these statements are true

143.

What are some examples of commands that are Simple Behaviors?

(multi-answer)

a)

startMotor();

b)

wait();

c)

turnLEDOn();

d)

turnLEDOff();

144.

Which of the following are complex behaviors?

a)

Turn on left motor

Turn on right motor

b)

Turn off left motor

Turn off right motor

c)

Reverse left motor

Turn off right motor

d)

Coding to complete labyrinth challenge

145.

Which one of these representations of Task Main will work in ROBOTC?

a)

Task main ()

b)

task main ()

c)

Taskmain ()

d)

task main;

146.

What does it mean when a command appears in color when typed in ROBOTC?

a)

The command is typed incorrectly

b)

ROBOTC recognizes the command as an important keyword

c)

The command is not allowed in the command

d)

So the programmer should look at the word or name carefully

147.

The purpose of 'whitespaces' (add some space between segments) is:

a)

To allow the robot to understand the program better

b)

To speed the operation of the robot

c)

To make the program more readable to the programmer

d)

To slow the operation of the robot

148.

If there are no more statements to run in the program:

a)

Continue its last statement until it can find another one

b)

Continue its last statement until it can find the Stop command

c)

The robot will go back to the beginning and start all over

d)

The robot will stop

149.

After task main() you put your code...

a)

directly after task main()

b)

inside of ( ) after task main()

c)

directly before task main()

d)

Inside { } after task main()

150.

True or False: You need a ; (semicolon) after ever line of code

a)

True

b)

false

151.

To make a robot perform a task for 8 seconds, which line of code is correct?

(multi-answer)

a)

stopFor(8);

b)

waitUntil(8000);

c)

wait(8);

d)

wait1Msec(8000);

152.

What is the proper way to make Single-Line Comment additional to code?

a)

// comment

b)

/* comment */

c)

\\ comment

d)

! comment !

153.

True or False: You can use pragma to change the names of the motors in your code?

a)

True

b)

False

154.

What is the proper way to create a Multi-Line Comment additional to code?

a)

" comment "

b)

/* comment */

c)

/ comment /

d)

// comment

155.

Find the error in this block of 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

156.

Pseudocode is

a)

A false code

b)

to be perfect and detailed

c)

A code, written in machine(binary) language, that the robot can understand.

d)

A description of a task that a human can use to code the program

157.

________ are a convenient way to talk about what the robot is doing and what it must do to carry out the plan created by the programmer.

a)

Operations

b)

Actions

c)

Behaviors

d)

Instructions

158.

Which of the following is a reason that programmers use pseudocode?

a)

It keeps the plan for the program organized

b)

Writing out the exact code commands takes too much time.

c)

It allows people who can’t read code to understand the plan for the program.

d)

All of the answers are true.

159.

When you press a button, which command would be used?

a)

untilTouch

b)

untilBump

c)

startMotor

d)

wait

160.

When you use a ultrasonic range finder, which command would be used?

a)

untilTouch

b)

untilSonarLessThan

c)

startMotor

d)

waitInMilliseconds

161.

Which part do we write code in?

a)

1

b)

2

c)

3

d)

4

162.

Comments in ROBOTC are what color text?

a)

Blue

b)

Green

c)

Orange

d)

Red

163.

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

a)

Debugger

b)

Timers

c)

Comments

d)

Pseudocode

164.

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

a)

Bounce

b)

Debugger

c)

Timers

d)

Boolean

165.

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 a finite loop to check for changes in your VEX components a number of times

c)

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

166.

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

167.

True or False: The current value of the variable will be used every time the variable appears

a)

True

b)

False

168.

How do we make a program loop indefinitely?

a)

if/else statements

b)

task main ()

c)

while (1==1)

d)

SensorValue ()

169.

Which is NOT an acceptable example of an infinite loop?

a)

while(true)

b)

while(1==1)

c)

while(not false)

170.

What speed is this program running?

a)

Full Speed

b)

Half speed

171.

A program is

a)

A logical and step-by-step set of directions for the robot to follow.

b)

A logical and step-by-step set of directions for the programmer to follow.

c)

A set of directions, written in paragraph form, that even a robot can follow.

172.

True or False: The role of the robot is to carry out the plan by following the steps in the program.

a)

True

b)

False

173.

When is the while loop true?

a)

Never

b)

Always

c)

When hit bumpSwitch

d)

limitStwitch

174.

Value of bump switch when pressed

a)

0

b)

1

c)

63

d)

127

175.

A motor can be reversed by_____________.

(multi-answer)

a)

Standing on my head and looking at the motor upside down

b)

Flipping the polarity (+/-) at the connection to the cortex microcontroller

c)

Check "Reverse" in Motors & Setup Pragma

d)

turn the motor with my LEFT hand instead of my right hand

176.

The following statement is an example of what kind of behavior: "startMotor (port2, 127);"

a)

Complex behavior

b)

Simple behavior

c)

Basic behavior

177.

The following statement is an example of what kind of behavior: "Turn on both motors at full speed"

a)

Complex behavior

b)

Simple behavior

c)

Basic behavior

178.

What will happen in this program?

a)

Robot will turn left

b)

Robot will turn right

c)

robot will move forward for 2 seconds

d)

Robot will move backward for 2 seconds

179.

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

a)

Complex behaviors

b)

Simple behaviors

c)

Basic behaviors

d)

Pseudocode

180.

True or False: Comments are used to make notes for the human programmers

a)

True

b)

False

181.

True or False: Program comments will be read as code and executed by ROBOTC.

a)

True

b)

False

182.

Limit and bump switches are what?

a)

Analog Sensors

b)

Motors

c)

Batteries

d)

Digital Sensors

183.

What does it mean when a command appears in color when typed in ROBOTC?

a)

command is not allowed

b)

command is typed incorrectly

c)

ROBOTC recognizes the command as an important keyword

184.

Every time you open ROBOTC on your computer desktop, you should check for these things... Which is the correct path to follow?

a)

Robot > Platform type > VEX 2.0 Cortex and Natural Language PLTW; Robot > VEX Cortex Communication Mode > USB Only

b)

Robot > Compile Program; Robot > VEX Communication Mode > VEX net or USB; View > Font Increase

c)

Robot > Compiler Target > Physical Robot; Robot > VEX Cortex Communication Mode > Competition VEXnet

185.

What software do we use to create programs for our robots?

a)

RobotC

b)

Vex IQ

c)

Lego Mindstorms

d)

Python

186.

How do you open a new template file for new programs?

a)

RobotC/Open File/This Pc/S12345

b)

RobotC/File/Open Sample Programs/Vex2/PLTW/PLTWtemplate.c

c)

VexVR/Load File From Device

187.

Which two settings are accurate for your PLATFORM TYPE?

a)

Vex 2.0 Cortex and Natural Language PLTW

b)

Vex 2.0 Cortex and Natural Language 2.0

c)

Vex IQ and Natural Language PLTW

d)

Vex IQ and Natural Language 2.0

188.

In order to run your robot without the orange USB cord, what should the Vex Cortex Communication mode be set to?

a)

VEXnet or USB

b)

USB only

c)

Competition (VEXnet)

189.

Where is the COMMUNICATION MODE setting found in RobotC?

a)

Click on "File"

b)

Click on "Robot"

c)

Click on "Edit"

d)

Click on "View"

190.

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

191.

Which type of motor do we use in class?

a)

Vex 269

b)

Vex 393

c)

Vex 393 High Speed Motor

d)

Vex 393 Turbo Speed Motor

192.

Which menu would you select to add a BUTTON to your program?

a)

Motor and Sensor Set-up

b)

Firmware Dowload

c)

Compile Program

d)

Download to Robot

193.

What do these instructions tell the robot to do?

a)

Move forward for 63 seconds

b)

Move backwards for 1 second

c)

Move forward for 1 second at half speed

d)

Wait 1 second before moving forward 63 inches

194.

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

195.

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

196.

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

197.

What color are the comments in RobotC?

a)

red

b)

black

c)

blue

d)

green

198.

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

199.

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

200.

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

201.

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.

202.
Pseudocode is:
a)
False code
b)
A code, written in English, that the robot can understand
c)
A code, written in binary language, that the robot can understand
d)
A set of basic steps that the human can use to plan the program
203.

What is NOT true about #pragma statements at the top of your program?

a)

They set the power levels of the motors.

b)

Their code is automatically generated by ROBOTC configuration wizard.

c)

They tell the robot which sensor/motor is connected to which port.

204.

If your robot is turning in circles, but your code indicates that it should be going forward, which option below will NOT fix the problem?

a)

You can reverse a motor in Motor and Sensor Set-up

b)

You can change the positive/negative signs in your code

c)

You can switch the ports where your drive train motors are plugged in

d)

You can turn one motor off and leave the other motor on

205.

If you download your code and the robot doesn't move, but the green line does move down the page, what might fix the problem?

a)

Click "Firmware Download"

b)

Reverse a motor

c)

Unplug the battery and plug it back in

d)

Click "Fix Formatting"

206.

What might be causing this error?

a)

Wrong Platform Type

b)

Wrong communication mode

c)

Motors are named incorrectly

d)

Capitalization error

207.

Where should students save their RobotC programs?

a)

On the desktop

b)

Not necessary, because the programs auto save on the web

c)

Student drive (look for s + lunch number)

d)

In the same folder as the PLTWtemplate files

208.

What is causing these errors?

a)

Wrong platform type

b)

Wrong communication mode

c)

Capitalization errors

d)

Missing semicolons

209.

What is most likely causing these errors?

a)

Missing semicolons

b)

Wrong platform type

c)

Wrong communication mode

d)

Missing pragma statements at the top