
Arduino Exam Revision 3
Presentation
•
English
•
7th - 12th Grade
•
Practice Problem
•
Easy
Bayden Schellein
Used 1+ times
FREE Resource
8 Slides • 15 Questions
1
Arduino Exam Revision 3
By Bayden Schellein
2
Conditional Statements - IF
3
The picture shows a list math operations the loop can check for.
Operations?
4
Conditional Statements - IF
In this example the code checks to see if the variable X is equal to 5, if it is then it prints the phrase 'X is 5!!'.
If it does not equal 5 then nothing happens.
if (Condition) {code to run}
5
Drag and Drop
6
Multiple Choice
What will the code do if the temp is 35?
Print "It's hot!" only
Print both "It's hot!" and "Stay hydrated!"
Cause an error
Print "Stay hydrated!" only
7
Conditional Statements - ELSE
8
Labelling
Label the code
Code If FALSE
Code if TRUE
Keyword
Condition
9
Multiple Choice
What will the following Arduino code print if x = 7?
Greater than 5
5 or less
Nothing, because x is not defined
error
10
Multiple Choice
What happens if the condition inside an if statement is false?
The code inside the if block runs anyway
The program crashes
The else block (if present) runs instead
The program stops
11
We can also check for multiple conditions at once.
If we use AND (&&) then we can check if two or more conditions are true.
AND? OR?
12
Match
Match the numbers with the colour it would produce
110
650
325
950
500
Red
Cyan
Yellow
Magenta
Green
Red
Cyan
Yellow
Magenta
Green
13
Multiple Choice
How do you check if x is between 10 and 20 in Arduino?
14
We can also check for multiple conditions at once.
If we use OR (||) then we can check if one or another condition are true.
AND? OR?
15
Multiple Choice
What will the following Arduino code print if x = 3?
Match Found
No Match
Error: OR condition used incorrectly
It won’t print anything
16
Multiple Choice
Which of these is a correct way to check if a variable temp is below 0°C OR above 100°C?
17
Multiple Choice
What will the following Arduino code print if buttonState = HIGH and motionDetected = LOW?
Action Triggered
No Action
Error: OR condition used incorrectly
It won’t print anything
18
Dropdown
19
Conditional Statements - ELSE IF
20
Match
Match what the code will run if the sensorValue is:
300
450
550
700
Low
Normal
Normal
High
Low
Normal
Normal
High
21
Match
Match the output for the program when the temperature is:
45
66
22
1
150
Warm
Very Hot
Mild
Cold
Extreme Danger!
Warm
Very Hot
Mild
Cold
Extreme Danger!
22
Multiple Choice
We want to modify the program and insert a new else if command after 'mild' but before 'cold'.
The new code should checks that the temperature is greater than or equal to 5.
If true it should respond with 'Freezing'
Select the correct code
23
Open Ended
This program has an issue.
Identify the issue and explain what the problem is and why the program wont work.
Fix the code
Arduino Exam Revision 3
By Bayden Schellein
Show answer
Auto Play
Slide 1 / 23
SLIDE
Similar Resources on Wayground
15 questions
Argumentative Writing
Presentation
•
6th - 12th Grade
21 questions
Sentence Types
Presentation
•
7th - 11th Grade
17 questions
Separation of Mixtures
Presentation
•
7th - 12th Grade
18 questions
Quotation Marks
Presentation
•
KG - University
18 questions
Verb Tenses
Presentation
•
7th Grade - University
19 questions
Energy in Earth's atmosphere
Presentation
•
8th - 12th Grade
19 questions
Grammar Basics: Verbals
Presentation
•
6th - 12th Grade
20 questions
Past continuous
Presentation
•
6th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade