Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming in ROBOTC ROBOTC Rules: Fundamentals

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which statement best describes ROBOTC as used in VEX robots?

a)

A hardware wiring configuration tool

b)

A spreadsheet-like macro recorder

c)

A visual drag-and-drop editor only

d)

A text-based language compiled for robots

2.

In ROBOTC, what is the effect of capitalizing a keyword incorrectly, such as writing "Task" instead of "task"?

a)

The text turns red and auto-corrects

b)

The program still runs but slows down

c)

The robot ignores whitespace only

d)

The command is not recognized by the compiler

3.

Given the code:
motor[port3] = 127;
wait1Msec(3000);
what happens when it runs?

a)

Program waits first, then runs the motor

b)

Motor toggles power every 3 seconds

c)

Motor on port 3 stops, then waits 3 s

d)

Motor on port 3 runs full power, then waits 3 s

4.

Why do programmers usually place each ROBOTC statement on its own line, even though whitespace is ignored by the machine?

a)

To improve human readability of code

b)

To reduce compile time significantly

c)

To change how the robot interprets commands

d)

To ensure semicolons are optional

5.

Which symbol marks the end of a ROBOTC statement and lets the compiler separate commands?

a)

A comma between parameters

b)

A colon before the next statement

c)

A period after closing brace

d)

A semicolon at the end of the statement

6.

Which paired punctuation surrounds parameters for commands like wait1Msec in ROBOTC?

a)

Angle brackets < >

b)

Curly braces { }

c)

Parentheses ( )

d)

Square brackets [ ]

7.

In ROBOTC, what is the primary role of task main?

a)

Store sensor values

b)

Repeat statements automatically

c)

Direct the program to the main code

d)

Define new variables globally

8.

A while loop in ROBOTC repeats code between its curly braces under what condition?

a)

After task main finishes

b)

Until a timer expires

c)

As long as its condition remains true

d)

Only once per program run

9.

Which statement about comments in ROBOTC is accurate?

a)

Robots execute single-line comments

b)

Comments are ignored by the compiler

c)

Multi-line comments use // on every line

d)

Comments must be placed at the end

10.

Given
motor[port3] = 127;
wait1Msec(3000);
inside task main, which modification best improves human readability without changing behavior?

a)

Move code outside task main entirely

b)

Remove all whitespace between tokens

c)

Add a descriptive comment above

d)

Replace parentheses with brackets