wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Spring Final Review Part II

Total questions: 35

Worksheet time: 20mins

Name
Class
Date
1.

What is a loop?

a)

A type of storage for us to store information we use in a code

b)

Allows us to run the code many times

c)

The type of information we store in a code

2.

What is the variable of the following statement:

int count = 3;

a)

int

b)

count

c)

3

d)

;

3.

What does this function does?

digitalWrite ()

a)

writes output value to either HIGH or LOW

b)

writes output value using PWM sequence

c)

sets a pin to either INPUT or OUTPUT

d)

pauses the program

4.

What does this function does?

pinMode ()

a)

writes output value to either HIGH or LOW

b)

writes output value using PWM sequence

c)

sets a pin to either INPUT or OUTPUT

d)

pauses the program

5.

What happens when you run this code:

digitalWrite (red, HIGH);

delay (5000);

a)

The red LED lights up for 5000 seconds

b)

The red LED turns off for 5000 seconds

c)

The red LED turns on for 5 seconds

6.
Why is a resistor important?
a)
It isn't important
b)
It increases the power of a circuit
c)
It controls the flow of electricity by lessening it to a certain amount
7.
What is an LED?
a)
a light
b)
a light emitting diode
c)
a part of a circuit
8.
What is an electrical circuit?
a)
An electrical loop with a starting point and an ending point.
b)
An arduino board
c)
A circuit that has leds, potentiometers, positive and negative volts.
9.
The (-) column on your breadboard represents the ground.
a)
True
b)
False
10.
The (+) column on your breadboard represents the positive charge or power to your circuit.
a)
True
b)
False
11.
In the RGB LED, the R stands for ___________
a)
Ready
b)
Red
c)
Read only
12.
A push button on a circuit is an ___________
a)
input
b)
output
c)
command
d)
variable
13.

When connecting a LED to the Arduino the cathode must be connected to:

a)

Positive

b)

5V

c)

Negative

d)

Any terminal available

14.

In order to produce light the anode must be connected to:

a)

the negative pole of the battery

b)

the positive pole of the battery

c)

It does not matter

15.

What do you call the long wire on the LED?

a)

Cathode

b)

Anode

c)

Resistor

d)

RGB

16.
digitalWrite(13, LOW); turns the light 
a)
on
b)
off
c)
dim
17.

The code "int yellow = 5;"...

a)

should be placed in the setup ().

b)

creates a variable that can store a letter or number.

c)

creates an integer variable with the value of 5

d)

is not valid C++ code

18.

A forward slash (i.e. // put your setup code here, to run once:) is used for

a)

code

b)

output

c)

comments

19.

The following line of code, means ________

pinMode(12, OUTPUT);

a)

Make the device in pin 13 set to ON state.

b)

Set the device in pin 12 as input.

c)

Set the device in pin 12 as output.

d)

Make the device in pin 12 set to Off state.

20.

The result of the following line Code is______


print(7%3);

a)

0

b)

1

c)

2

d)

3

21.

What is the output of the snippet code ?

a)

3

b)

4

c)

5

d)

6

22.

How to define a Led connected to pin 13 in Arduino?

a)

Pinmode(13,INPUT);

b)

pinMode(13,INPUT);

c)

Pinmode(13,OUTPUT);

d)

pinMode(13,OUTPUT);

23.

Which function runs only one time?

a)

loop();

b)

setup();

c)

calculate();

d)

random();

24.

What is the output for the following code?

int x=5;

int y=3;

x+=y;

Serial.print(x+y);

a)

6

b)

8

c)

10

d)

11

25.

Increment variable

a)

&&

b)

||

c)

++

d)

- -

26.

Decrement variable

a)

&&

b)

||

c)

++

d)

- -

27.

A variable that can only be seen, used and updated by code within the same scope. Typically this means the variable was declared (created) inside a function -- includes function parameter variables.

a)

global variable

b)

local variable

c)

true variable

d)

false variable

28.

A variable that can be used and updated by any part of the code. Its scope is typically derived from the variable being declared (created) outside of any function, object, or method.

a)

global variable

b)

local variable

c)

true variable

d)

false variable

29.

This holds one of two values, true or false.

a)

boolean

b)

float

c)

char

d)

void

30.

Comparison operator which means equal to.

a)

++

b)

==

c)

--

d)

!=

31.

Comparison operator which means not equal to.

a)

++

b)

==

c)

--

d)

!=

32.

Comparison operator which means greater than or equal to.

a)

//

b)

&&

c)

<=

d)

>=

33.

Used to end a statement

a)

!

b)

"

c)

;

d)

\

34.

Which command is called when a sketch starts. Use it to initialize variables, pin modes, start using libraries, etc. It will only run once, after each power up or reset of the Arduino board.

a)

loop ( )

b)

delay( )

c)

setup ( )

d)

input( )

35.

Which command is called repetitively over and over again as long as the Arduino has power.

a)

loop ( )

b)

delay( )

c)

setup ( )

d)

input( )