Intro to CS Unit 3 Review

Intro to CS Unit 3 Review

Assessment

Flashcard

Computers

9th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

25 questions

Show all answers

1.

FLASHCARD QUESTION

Front

When do you use an else statement?

Back

To tell what will happen when an if-statement is false.

2.

FLASHCARD QUESTION

Front

Write the code to test if num1 and num2 are the same.

Back

if (num1 == num2)

3.

FLASHCARD QUESTION

Front

Consider the following code:
word = "kangaroo"
if (word == "KANGAROO"):
print ("TRUE")
else:
print ("FALSE")
What is output?

Back

FALSE

Answer explanation

Capitalized words in a string are not equal to their lower case counter parts. So,​

“kangaroo” does not

equal “KANGAROO” which is why the output is false

4.

FLASHCARD QUESTION

Front

Consider the following code: if (90 < = x <= 100). It should be rewritten as:

Back

if (90 < = x and x <= 100):

Answer explanation

This correctly tests if 90 is less than or equal to x and tests if x is less than or equal to 100

5.

FLASHCARD QUESTION

Front

When do you use an else statement?

Back

When you need something to happen when the if condition is false

Answer explanation

An else statement will run lines of code when all of the other conditions that are checked are false

6.

FLASHCARD QUESTION

Front

Write the code to test if num1 and num2 are NOT the same.

Back

if (num1 != num2 )

7.

FLASHCARD QUESTION

Front

What does != mean?

Back

not equal

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?