wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Day2 Quiz Arduino

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

Why do we use the pinMode function?

a)

It helps us to organize our code

b)

It's a fancy anime skill name and it's cool

c)

Because we want to pin our mode sometimes

d)

pinMode allos us to set the digital pin that we want to either OUTPUT or INPUT mode

2.

Which of the following is/are correct?

a)
b)
c)
d)
3.

Which of the following statement(s) is/are true?

a)

digitalWrite either output a 5V (high) or a 0v (low/ground)

b)

digitalWrite either output a 3.3V (high) or a 0v (low/ground)

c)

When using digitalRead(8), supplying 0v on pin 8 will give us a HIGH on the respective pin

d)

When using digitalRead(8), supplying 0v on pin 8 will give us a LOW on the respective pin

4.

From the official Arduino IDE, you cannot upload the code and use the Serial monitor if you didn't connect your Arduino to your computer

a)

True

b)

False

5.

Every electronic has a (a)   , it can either be source or sink (give or take), if we exceed the limit we will damage or blow up the electronic

6.

Arduino will remember whatever code you uploaded to it, and every time you power up the Arduino it will run the setup function, and then keep repeating the loop function

a)

True

b)

Sometimes True

c)

Sometimes False

d)

False

7.

What is/are the difference(s) between active and passive buzzer?

a)

Active buzzer only output 1 frequency of sound, while passive buzzer can output from 50hz - 14000hz

b)

Active buzzer is more active than a passive buzzer

c)

We control the passive buzzer by using Arduino's tone function, and we can possibly make music out of it

d)

Active buzzer is usually expensiver and bigger, while passive buzzer is not

8.

What below is/are true about a condition in Programming?

a)

It's either true or false

b)

usually made up by relational operator, but not all the time

c)

the state of something with regard to its appearance, quality, or working order.

d)

We use it in places such as if, for, and while, these control statements will only run when the condition is true

9.

What is/are the difference(s) between while and for loop?

a)

We use for loop when we know how many times the loop will run, we use while loop when we want the loop to terminate based on a condition instead of the number of times it runs

b)

They make no difference at all

c)

while loop is not based on condition while for loop is based on condition

d)

The body code of while loop will run when the condition is false, the body code of for loop will run when the condition is true

10.

if statement is useful because we can check whether the condition is true or not before we decide to execute the particular line of code (e.g. checking the day in a week)

a)

Correct

b)

Incorrect