PIF _ Quiz Week 4

PIF _ Quiz Week 4

9th - 12th Grade

33 Qs

quiz-placeholder

Similar activities

Опрос для проекта  "Национальные и интернациональные особенности архитектуры модерна"

Опрос для проекта "Национальные и интернациональные особенности архитектуры модерна"

9th - 12th Grade

28 Qs

MAPIL ROBOTIKA XI

MAPIL ROBOTIKA XI

11th Grade

35 Qs

Using Arduino to Blink an LED

Using Arduino to Blink an LED

12th Grade

28 Qs

SOAL UJIM MID SEMESTER GANJIL KONSENTRASI XI TAV

SOAL UJIM MID SEMESTER GANJIL KONSENTRASI XI TAV

11th Grade

30 Qs

AllElec

AllElec

9th - 12th Grade

32 Qs

Robotics Section 10 Comp Manual 24-25

Robotics Section 10 Comp Manual 24-25

9th - 12th Grade

28 Qs

Technology Topic 1,2

Technology Topic 1,2

8th Grade - University

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?