Module 5 Review Game
Quiz by Katrina Knoedl
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
- Q1
Mitsuyo is working with a game level designer on a new video game. The designer sends the information below:
Is the enemy strength at least 12?
True: Subtract 6 from player health
False: Subtract 2 from player health.
She must implement that logic in code, using the variables enemyStrength and playerHealth.Which of these code snippets correctly implements the logic provided above?Choose 1 answer:
30s - Q2
With if statements, our programs can execute a set of instructions only if the condition is false.
falsetrueTrue or False30s - Q3
Marcie is developing a program to assign pass/fail grades to students in her class, based on their percentage grades.
Their college follows this grading system:
60% and above PASSLower than 60% FAIL
The variable percentGrade represents a student's percentage grade, and her program needs to set grade to the appropriate value.
Which of these code segments correctly sets the value of grade?Note that there are 2 answers to this question. Choose the correct answers:
30s - Q4
The code below processes two numerical values with a conditional statement.
The code displays whichever number is greater (num1 or num2) or displays numB if they are equal.
The code displays whichever number is smaller (num1 or num2) or displays num2 if they are equal.
The code either displays whichever number is greater (num1 or num2) or displays numA if they are equal.
30s - Q5
The general syntax for an if statement is:
30s - Q6
Computer programs make decisions using Boolean expressions inside __________.Correct Answer
comparison operators
variables
conditionals
instructions
30s - Q7
In the code below, the statement "n is a positive number!" will only be printed if which condition is true?
The value of variable n is equal to seven
The value of variable n is greater than zero
The value of variable n is less than zero
30s - Q8
The instruction portion of an if statement is limited to only 5 lines of code.
falsetrueTrue or False30s - Q9
We cannot store the results of a boolean expression as a variable.
falsetrueTrue or False30s - Q10
The code below is from a sign-up form. It accepts two string inputs from a user and then processes them with a conditional statement.
The code displays "Looks good!" if the two emails are equal, and displays "Try again!" otherwise.
The code displays "Looks good!" if the two emails are different, and displays "Try again!" otherwise.
The code displays "Looks good!" if the two emails are equal once they're lowercased, and displays "Try again!" otherwise.
30s - Q11
If Statements will always evaluate to either true or false.
truefalseTrue or False30s - Q12
What is not one of the 3 parts to an if statement?
(condition)
{instructions}
variable
if
30s - Q13
After the following code runs, what will be displayed?
x is a positive number!
x is a positive number!
End Program
0
End Program
30s - Q14
What symbol would be used for "strictly not equal to?"
!==
=!
+=
<=
30s - Q15
In the code below, the user is told to wear sunscreen if which of the following conditions is true?
degreesOutside = 50
OR
numberOfClouds = 50
degreesOutside < 70
AND
numberOfClouds < 5
degreesOutside < 70
OR
numberOfClouds < 5
30s