wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Grade 6

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What does the digitalWrite() function do in Arduino?

a)

Reads the value from a pin

b)

Writes a digital value to a pin

c)

Delays the program

d)

Initializes the program

2.

Which function is called only once at the start of an Arduino program?

a)

void loop()

b)

void setup()

c)

digitalWrite()

d)

delay()

3.

In the context of Arduino, what does the delay() function do?

a)

It stops the program

b)

It pauses the program for a specified time

c)

It initializes variables

d)

It reads sensor data

4.

Which of the following is the correct way to declare a pin as an output in void setup()?

a)

pinMode(pin, INPUT);

b)

pinMode(pin, OUTPUT);

c)

digitalWrite(pin, HIGH);

d)

delay(pin);

5.

If you want to turn on an LED connected to pin 7, which command should you use?

a)

digitalWrite(7, HIGH);

b)

digitalWrite(7, LOW);

c)

pinMode(7, HIGH);

d)

delay(7);

6.

What is the purpose of the void loop() function in Arduino?

a)

To execute code only once

b)

To repeat the code continuously

c)

To read input from sensors

d)

To set up the initial conditions

7.

Which unit is used to measure electric current?

a)

Volt

b)

Ampere

c)

Ohm

d)

Watt

8.

How do you turn off an LED connected to pin 8?

a)

digitalWrite(8, HIGH);

b)

digitalWrite(8, LOW);

c)

pinMode(8, LOW);

d)

delay(8);

9.

What happens if you forget to call pinMode() for a pin?

a)

The pin will automatically be set to OUTPUT

b)

The pin will not function as expected

c)

The program will crash

d)

Nothing; it will work fine

10.

If you wanted to create a simple program that turns on three LEDs in sequence, what would you use?

a)

Only delay()

b)

Only digitalWrite()

c)

Both delay() and digitalWrite()

d)

Only void setup()