
Nested and Compound Conditionals Quiz
Authored by Michael Weingarden
Computers
12th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `onMousePress` function in this code?
To move the eyes on the face
To change the background color of the face
To toggle the mouth of the clicked face between '-' and 'o'
To draw a new face at the mouse location
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of conditional structure is used to check the location of the mouse click?
Simple `if` statements
Switch-case statement
Compound and nested `if`/`elif` statements
Try-except blocks
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which face changes when you click in the top-left quadrant of the screen (mouseX = 200)):`
`if ((mouseX > 300) and (mouseY > 300)):`
`if ((mouseX = 200) and (mouseY >= 200)):`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What kind of conditional is used inside each quadrant check?
A try-except
A nested if-else
A while loop
A switch-case
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial value of each face's mouth?
'-'
'o'
'neutral'
Undefined
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times is `drawFace` called in the program?
2
3
4
It depends on mouse clicks
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?
Similar Resources on Wayground
10 questions
Intro to Windows Server 2012
Quiz
•
12th Grade
10 questions
HT3.2- Validation and Reliability
Quiz
•
8th Grade - University
11 questions
65. Logic - Logic Gates and Circuits Quiz
Quiz
•
9th - 12th Grade
10 questions
XÂU KÍ TỰ
Quiz
•
9th - 12th Grade
10 questions
B2 curs 1 recapitulare
Quiz
•
9th - 12th Grade
10 questions
Technical Terms - Internet (A-Z) - Avatar
Quiz
•
12th Grade
10 questions
Technical Terms - Internet (A-Z) - W3C
Quiz
•
12th Grade
10 questions
Technical Terms - Internet (A-Z) - SMTP
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade