
Module 5 Review Game
Quiz by Katrina Knoedl
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
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:
With if statements, our programs can execute a set of instructions only if the condition is false.
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:
The code below processes two numerical values with a conditional statement.

The general syntax for an if statement is:
Computer programs make decisions using Boolean expressions inside __________.Correct Answer
In the code below, the statement "n is a positive number!" will only be printed if which condition is true?

The instruction portion of an if statement is limited to only 5 lines of code.
We cannot store the results of a boolean expression as a variable.
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.

If Statements will always evaluate to either true or false.
What is not one of the 3 parts to an if statement?
After the following code runs, what will be displayed?

What symbol would be used for "strictly not equal to?"
In the code below, the user is told to wear sunscreen if which of the following conditions is true?

What does the following symbol mean?

x = true
y = true
z = false
Given the values shown above, what is the resulting value of the following Boolean expression?
x AND ( y OR ( NOT z ))
What is the resulting value of true AND false?
What is the resulting value of true OR true?
This program uses a conditional to determine if it is safe to go boating based on current weather conditions.
Select all of the possible values that are NOT Boolean variables from the options below.
What does the following symbol mean?

What is the resulting value of false AND true?
What is the resulting value of false OR true?
What is the resulting value of false OR false?
What is the resulting value of false AND NOT true?
x = true
y = false
z = true
Given the values shown above, what is the resulting value of the following Boolean expression?
x && ( y || ( !z ))
What does the following symbol mean?

Choose 1 answer:

According to the US constitution, a person must be at least 18 years old and a citizen of the US to vote in any local, state, or federal election. The variable "age" represents the potential voter's age and the variable "citizen" represents his or her citizenship status.
Which of the following expressions evaluates to true if a potential voter meets the criteria?
A software engineer uses this nested conditional for the online mapping software they're building.
