
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
2025 python class first quiz
Quiz
•
9th Grade - University
10 questions
COMPUTACIÓN II
Quiz
•
12th Grade
10 questions
MEDIA AND INFORMATION LITERACY
Quiz
•
12th Grade
10 questions
Human Computer Interface
Quiz
•
8th - 12th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
A level Computer Science In-fix post-fix Reverse polish
Quiz
•
10th Grade - University
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade