In Python, what are if-statements used for?
PYTHON "If" Statement

Quiz
•
Computers
•
6th Grade
•
Medium
Fazla Fairooz
Used 393+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Looping
Indexing
Decision Making
Testing
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
click = True
Like = 0
if click:
Like = Like + 1
print(Like)
0
1
2
3
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
What is the output of following code
Temperature = 20
Thermo = 15
if Temperature < 15:
Thermo = Thermo + 5
print(Thermo)
20
15
25
10
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
Time = "Day"
Sleepy = False
Pajamas = "Off"
if Time == "Night" and Sleepy == True:
Pajamas = "On"
print(Pajamas)
off
on
False
Day
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
def max(a, b):
if a > b:
print('a is the max')
else:
print('b is the max')
max(1,2)
1 is the max
a is the max
2 is the max
b is the max
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following statements are correct?
(Select 2 Answers)
If is a conditional statement
If is used for looping
If is used for comparing and decision making
If is used for error handling
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the be the output of the following code?
if (10<0) and (0 <-10):
print(“A”)
else:
print(“B”)
A
B
AB
BA
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Grade 6- PRINT statement in Python

Quiz
•
6th Grade
8 questions
Python PRIMM L4

Quiz
•
6th Grade
11 questions
print(), int and input() - Python

Quiz
•
6th - 8th Grade
10 questions
Advanced Python Quiz1

Quiz
•
6th - 8th Grade
15 questions
Python-Interactive Mode

Quiz
•
6th Grade
10 questions
Python Variables

Quiz
•
6th Grade
16 questions
Loops

Quiz
•
5th - 12th Grade
14 questions
Python Data types & Exceptions

Quiz
•
1st - 10th 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
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
20 questions
Final Exam Vocabulary

Quiz
•
6th Grade
11 questions
Decimal/fraction conversions quick check

Quiz
•
5th - 7th Grade
10 questions
Identifying equations

Quiz
•
KG - University
49 questions
How Well Do You Know Your 6th Grade Teachers?

Quiz
•
6th Grade
5 questions
Multiply Decimals

Lesson
•
5th - 6th Grade
10 questions
Adding and Subtracting Decimals

Quiz
•
6th Grade
33 questions
Mechanical Energy Transfer

Quiz
•
6th Grade