
Nested and Compound Conditionals Quiz

Quiz
•
Computers
•
12th Grade
•
Hard
Michael Weingarden
FREE Resource
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
Similar Resources on Wayground
10 questions
Python Abstraction

Quiz
•
12th Grade
10 questions
SC102- Lesson 1 (Recap)

Quiz
•
5th Grade - University
10 questions
Excel

Quiz
•
1st - 12th Grade
10 questions
AP CSP Boolean Logic 4

Quiz
•
9th - 12th Grade
10 questions
9 . Lists, Tuples, Sets and Dictionary - 4

Quiz
•
12th Grade
10 questions
Python List Mastery

Quiz
•
12th Grade
10 questions
Python- Operators

Quiz
•
12th Grade
10 questions
Technical Terms - Internet (A-Z) - Sass

Quiz
•
12th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade