PIF _ Quiz Week 4

PIF _ Quiz Week 4

9th - 12th Grade

33 Qs

quiz-placeholder

Similar activities

Flight: The Aerodynamics Behind Aircraft

Flight: The Aerodynamics Behind Aircraft

10th Grade - University

37 Qs

4.3.1 - Brainstorming

4.3.1 - Brainstorming

10th Grade - University

34 Qs

Bài 6 Vật liệu mới

Bài 6 Vật liệu mới

11th Grade

28 Qs

UH PRAKARYA KELAS X SMT 2

UH PRAKARYA KELAS X SMT 2

10th Grade - University

30 Qs

dongkrak

dongkrak

10th Grade

30 Qs

Manutenção Produtiva Total e RCM

Manutenção Produtiva Total e RCM

12th Grade - University

29 Qs

SOAL UJIM MID SEMESTER GANJIL KONSENTRASI XI TAV

SOAL UJIM MID SEMESTER GANJIL KONSENTRASI XI TAV

11th Grade

30 Qs

Ex T3 GMMIE - Gestión del Almacén

Ex T3 GMMIE - Gestión del Almacén

12th Grade

30 Qs

PIF _ Quiz Week 4

PIF _ Quiz Week 4

Assessment

Quiz

Engineering

9th - 12th Grade

Practice Problem

Hard

Created by

Chun Ng

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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?