wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming Concepts

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Multi-Line Comment

a)

Indicated by /* */ in the code.

b)

Indicated by // in the code.

c)

Indicated by # in the code.

d)

Indicated by in the code.

2.

Increment in For Loop

a)

Executed each time through the loop when the condition is true, modifying the loop control variable.

b)

Executed only once before the loop starts.

c)

Executed only if the loop condition is false.

d)

Executed at the end of the loop iteration.

3.

void loop()

a)

Contains code that repeats until the sketch ends with a command or the Reset button.

b)

Is used to define a function that runs only once.

c)

Is a function that initializes variables before the main program runs.

d)

Is a command that stops the execution of the program.

4.

prizm.setServoPosition( );

a)

Sets angle of servo motor

b)

Controls the speed of the motor

c)

Turns the motor on and off

d)

Adjusts the brightness of an LED

5.

Initialization in For Loop

a)

Occurs first and only once.

b)

Occurs every iteration of the loop.

c)

Occurs at the end of the loop.

d)

Is optional and can be skipped.

6.

delay();

a)

Represents the number of milliseconds to pause the program.

b)

Sets a timer for a specific event.

c)

Increases the speed of program execution.

d)

Halts the program indefinitely.

7.

Single Line Comment

a)

Indicated by // in the code.

b)

Indicated by /* */ in the code.

c)

Indicated by # in the code.

d)

Indicated by -- in the code.

8.

Verify/Compile

a)

Checks code for errors.

b)

Runs the code without checking for errors.

c)

Optimizes the code for performance.

d)

Converts code into a different programming language.

9.

Servo

a)

Turns 90 degrees

b)

Turns 180 degrees

c)

Turns 360 degrees

d)

Does not turn

10.

For Loop

a)

A control flow statement that allows the repeated execution of a block of code for a specific number of times.

b)

A type of loop that continues indefinitely until a specific condition is met.

c)

A statement that executes a block of code only once.

d)

A method for defining functions in programming.

11.

Motor

a)

Turns 180 degrees

b)

Turns 360 degrees

c)

Turns 90 degrees

d)

Turns 270 degrees

12.

prizm.readSonicSensorIN(); 

a)

Sets up Sensor to read inches

b)

Initializes the sensor for temperature measurement

c)

Configures the sensor to read centimeters

d)

Activates the sensor for sound detection

13.

Ultrasonic Sensor

a)

The information gathered communicates distance.

b)

It measures temperature variations.

c)

It detects light intensity.

d)

It calculates humidity levels.

14.

  1. prizm.setRedLED(LOW)

a)

Turns red Prizm LED off

b)

Turns red Prizm LED on

c)

Flashes red Prizm LED

d)

Disables red Prizm LED

15.

If Statement

a)

A control structure that repeats a block of code multiple times.

b)

Checks a condition and executes statements if the condition is true.

c)

A method for defining variables in programming.

d)

A way to handle errors in a program.

16.

Arduino Integrated Development Environment (IDE)

a)

Open-source software that compiles code and uploads it to the hardware.

b)

A proprietary software for programming microcontrollers.

c)

A hardware component used for circuit design.

d)

A cloud-based platform for IoT applications.

17.

Condition in For Loop

a)

Tested each time through the loop; if true, the loop continues; otherwise, it ends.

b)

Executed only once regardless of the condition.

c)

Runs indefinitely without checking any condition.

d)

Only checks the condition at the beginning of the loop.

18.

prizm.PrizmBegin();

a)

Initializes the PRIZM controller.

b)

Starts the PRIZM interface.

c)

Configures the PRIZM settings.

d)

Resets the PRIZM system.

19.

While Loop

a)

Checks a test condition inside parentheses to see if it remains true, and loops continuously until the condition becomes false.

b)

Executes a block of code a specific number of times regardless of a condition.

c)

Loops through a collection of items until all items have been processed.

d)

Checks a condition before executing the loop for the first time.

20.

prizm.setRedLED(HIGH)

a)

Turns red Prizm LED on

b)

Turns green Prizm LED off

c)

Flashes the Prizm LED

d)

Turns off all Prizm LEDs