PIF _ Quiz Week 4

PIF _ Quiz Week 4

9th - 12th Grade

33 Qs

quiz-placeholder

Similar activities

Fusion Basics

Fusion Basics

9th - 12th Grade

30 Qs

K3LH Kelistrikan

K3LH Kelistrikan

10th Grade

31 Qs

Skyscrapers: The Architecture and Engineering

Skyscrapers: The Architecture and Engineering

10th Grade - University

28 Qs

1.2.5 - Engineering Technicians and Tradespeople

1.2.5 - Engineering Technicians and Tradespeople

10th Grade - University

28 Qs

AUTOCAD EOT

AUTOCAD EOT

10th Grade

30 Qs

Evaluación final electricidad 2ºESO

Evaluación final electricidad 2ºESO

8th Grade - University

31 Qs

ED Webxam Review 2

ED Webxam Review 2

9th - 12th Grade

30 Qs

PIF _ Quiz Week 4

PIF _ Quiz Week 4

Assessment

Quiz

Engineering

9th - 12th Grade

Hard

Created by

Chun Ng

Used 1+ times

FREE Resource

33 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the keyword volatile in Arduino?
To define a constant value
To declare a variable with a fixed value
To indicate that a variable's value might change unexpectedly
To create a pointer variable
To define a function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to read the state of a button connected to digital pin 2?
pinMode(2, INPUT)
digitalWrite(2, HIGH)
digitalRead(2)
analogRead(2)
Serial.read(2)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between Serial.print() and Serial.println() in Arduino?
Serial.print() displays text, while Serial.println() displays numbers
Serial.print() displays data without a new line, while Serial.println() adds a new line
Serial.print() sends data to the Arduino, while Serial.println() receives data
Serial.print() is used for debugging, while Serial.println() is used for normal output
There is no difference

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the millis() function in Arduino?
To generate a random number
To measure the voltage on an analog pin
To return the number of milliseconds since the program started running
To delay the program execution for a specified number of milliseconds
To read the state of a button

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code snippet do? <br> if (digitalRead(buttonPin) == HIGH) {<br> // Code to execute<br> }
Executes the code block if the button is pressed
Executes the code block if the button is not pressed
Configures the button pin as an input
Configures the button pin as an output
Prints the button state to the Serial Monitor

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the else keyword in an if statement?
To specify an alternative code block to execute if the if condition is false
To repeat a block of code multiple times
To define a function
To declare an array
To end the program

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code snippet do? <br> while (true) {<br> // Code to be executed<br> }
Executes the code block once
Executes the code block a fixed number of times
Executes the code block indefinitely
Causes a compile-time error
Prints the value of true to the Serial Monitor

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?