The if, elif, else statement is used for...

Y8 If, elif, else

Quiz
•
Computers
•
8th - 9th Grade
•
Hard
Used 86+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
selection
iteration
indentation
printing
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which symbol should go at the end of an if statement?
"
)
:
;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what does the == sign do in this code?
compares the value stored in the password variable with the string "secret"
assigns the string value "secret" to the password variable
prints the password
asks the user to input their password
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
what is the variable name in this code?
if
secret
password
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output when this code is run?
65
42
output A
output B
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
else: is used
to give an extra condition
to provide an output when the other conditions are false
because it is required
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with this code?
the if and else keywords need to switch
the if and elif keywords need to switch
the elif and else keywords need to switch
there needs to be an extra else statement
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Python Boolean and If

Quiz
•
9th - 12th Grade
12 questions
Control Structure

Quiz
•
9th Grade - University
12 questions
Python Programming Basics

Quiz
•
7th - 11th Grade
15 questions
Python Conditionals and If Statements

Quiz
•
8th Grade - University
10 questions
KS4 Programming Techniques (1)

Quiz
•
8th - 10th Grade
9 questions
Be Internet Awesome: Secure Your Secrets!

Quiz
•
5th - 8th Grade
8 questions
KS3 Computing

Quiz
•
8th Grade
10 questions
KS3 GCSE Computer Science (Programming / Python)

Quiz
•
7th - 11th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade