Nested and Compound Conditionals Quiz

Nested and Compound Conditionals Quiz

12th Grade

6 Qs

quiz-placeholder

Similar activities

Boolean APCSP

Boolean APCSP

9th - 12th Grade

10 Qs

Pseudocode Practice Quiz

Pseudocode Practice Quiz

9th - 12th Grade

7 Qs

Java If Else

Java If Else

9th - 12th Grade

10 Qs

Code.org Unit 5 Vocab Quiz 1

Code.org Unit 5 Vocab Quiz 1

9th - 12th Grade

10 Qs

Python IF Statements

Python IF Statements

9th - 12th Grade

10 Qs

Unit 2 Vocabulary, PLTW COM Science

Unit 2 Vocabulary, PLTW COM Science

9th - 12th Grade

9 Qs

Excel If function WSC 4.2.3

Excel If function WSC 4.2.3

7th Grade - University

10 Qs

AP CSP Booleans

AP CSP Booleans

9th - 12th Grade

10 Qs

Nested and Compound Conditionals Quiz

Nested and Compound Conditionals Quiz

Assessment

Quiz

Computers

12th Grade

Hard

Created by

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