NEW
Font size
WorksheetsFundamentals in RobotC
Total questions: 25
Worksheet time: 13mins
ROBOTC is a _________________ programming language based on the standard C programming language.
message
text-based
data
conditional
Text written as part of a program is called _______
byte
bitmap
function
code
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.
spaces
capitalization
letters
numbers
3000 milliseconds is the same as
3 minutes
3 hours
3 seconds
3ml
Statements run in English reading order. As soon as one command is complete, the next runs.
(right-to-left, top-to-bottom).
(left-to-right, bottom-to-top).
(left-to-right, top-to-bottom).
(right-to-left, bottom-to-top).
When the program runs out of statements and reaches the ____ symbol in task main, all motors stop, and the program ends.
]
;
{
}
How does RobotC know where one statement ended and the other began?
It knows because of the semicolon at the end of each line.
It knows because of the curly brackets at the end of each line.
It knows because of the square brackets at the end of each line.
It knows because of the bracket at the end of each line.
Every __________________ ends with a semicolon. It’s like the period at the end of a sentence.
sentence
code
statement
option
Every punctuation pair consists of an “_______” punctuation mark and a “________” punctuation mark.
"first" "last"
"starter" "ending"
"initial" "ending"
"opening" "closing"
Different commands make use of different punctuation. The motor command uses square brackets and the wait1Msec command uses _____________.
curly brackets
parentheses
square brackets
semi-colon
Simple statements can only run one after another in order, but __________ statements allow the program to choose the order that statements are run.
command
instructional
running
control
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.
task main
starting up
main body
body start
The left and right curly braces { } belong to the_________structure. They surround the commands which will be run in the program
running
main body
command
task main
Normally, statements run only once, but with a __________, they can be told to repeat over and over for as long as you want
while loop
repeater
duplicator
infinity runner
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.
task main
run
main body
main command
For this, ROBOTC allows “comments” to be made. It starts with _____
"
(
//
[
Punctuation, both single like semicolons and paired like parentheses, are used to set apart important parts of ___________
words
sentences
commands
paragraphs
ROBOTC automatically _________ key words that it recognizes
counts
weighs
colors
marks
Spaces, tabs, and line breaks are generally unimportant to ROBOTC and the robot. True or False
True
False
Sometimes true
Always False
Statements are commands to the robot. Each statement e is also usually written on its own line to make it ________.
easier for the robot to read
organized
neat
easier for humans to read.
1. A program is
A logical and step-by-step set of directions for the robot to follow.
A logical and step-by-step set of directions for the programmer to follow.
A set of directions, written in paragraph form, that even a robot can follow.
D. None of the answers are correct.
2. True or False: The role of the robot is to carry out the plan by following the steps in the program.
True
False
Sometimes true
Always false
Pseudocode is
A false code
A code, written in English, that the robot can understand.
A code, written in binary language, that the robot can understand.
A set of basic steps that the human can use to plan the program.
________ 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.
Operations
Actions
Behaviors
Instructions
Which of the following is a reason that programmers use pseudocode?
It keeps the plan for the program organized.
Writing out the exact code commands takes too much time.
It allows people who can’t read code to understand the plan for the program.
All of the answers are true.
