
PIF-Quiz 4
Authored by Chun Ng
Engineering
9th - 12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the output of the following code? <br> int x = 5;<br> x = x + 2;<br> Serial.println(x);
2
7
5
10
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What does the following code do? <br> pinMode(13, OUTPUT);
Reads the state of digital pin 13
Sets digital pin 13 to high
Sets digital pin 13 to low
Configures digital pin 13 as an output
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which function is used to read the value of an analog pin in Arduino?
digitalRead()
analogRead()
pinMode()
digitalWrite()
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of the delay() function in Arduino?
To read data from a sensor
To print output to the serial monitor
To pause the program execution for a specified time
To define a function
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the correct way to declare a constant variable named "LED_PIN" with a value of 9 in Arduino?
const int LED_PIN = 9;
int const LED_PIN = 9;
#define LED_PIN 9
All of the above
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which operator is used to check if two values are NOT equal in Arduino?
=
==
!=
>
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of a comment in Arduino code?
To tell the Arduino what to do
To make the code look nicer
To explain the code to humans
To store data
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?