wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Fundamentals in RobotC

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

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

a)

message

b)

text-based

c)

data

d)

conditional

2.

Text written as part of a program is called _______

a)

byte

b)

bitmap

c)

function

d)

code

3.

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

4.

3000 milliseconds is the same as

a)

3 minutes

b)

3 hours

c)

3 seconds

d)

3ml

5.

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).

6.

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)

}

7.

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.

8.

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

a)

sentence

b)

code

c)

statement

d)

option

9.

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

a)

"first" "last"

b)

"starter" "ending"

c)

"initial" "ending"

d)

"opening" "closing"

10.

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

11.

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

12.

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

13.

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

14.

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

15.

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

16.

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

a)

"

b)

(

c)

//

d)

[

17.

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

18.

ROBOTC automatically _________ key words that it recognizes

a)

counts

b)

weighs

c)

colors

d)

marks

19.

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

20.

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.

21.

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.

22.

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

23.

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.

24.

________ 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

25.

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.