When do you use an else statement?

CS Principles - Unit 3 Quiz

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Courtney Stenzhorn
Used 27+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
To tell what will happen when an if-statement is false
To end an IF statement
To handle string values
To input a variable
2.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Select all the mistakes (there may be more than one) in the following:
The = should be ==
elseif should be elif
there is no end if
The else should have a :
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is NOT true about all algorithms?
All algorithms can only do number calculations.
All algorithms have clear instructions.
All algorithms stop in a finite amount of time.
All algorithms have an order.
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The following code could be rewritten using:
not
or
and
none of the answers
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
When should you use an ELIF statement?
To repeat sections of code
To make a follow-up True/False decision
To counter user actions
To get user input
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Write the code to test if the number in the variable text1 is greater than 15.
if (text1 > "15"):
if (text1 < "15"):
if (text1 >= 15):
if (text1 > 15):
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Write the code to test if the number 78 is stored in the variable text1:
if (text1 == "78"):
if (str(text1) == 78):
if (text1 == 78):
if ("text1" == 78):
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
PYTHON PROGRAMMING

Quiz
•
11th - 12th Grade
20 questions
Week 6 - CP1

Quiz
•
12th Grade
17 questions
Python

Quiz
•
6th - 10th Grade
15 questions
Selection Quiz 2

Quiz
•
12th Grade
19 questions
ProA Desarrollo de Software 3° año

Quiz
•
1st - 12th Grade
20 questions
Python Programming Quiz

Quiz
•
9th Grade - University
15 questions
Eval. 1BIM - 1ro B

Quiz
•
7th Grade - University
16 questions
Variables

Quiz
•
7th - 10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Computers
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
10 questions
Right Triangles: Pythagorean Theorem and Trig

Quiz
•
11th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
24 questions
LSO - Virus, Bacteria, Classification - sol review 2025

Quiz
•
9th Grade
65 questions
MegaQuiz v2 2025

Quiz
•
9th - 12th Grade