PYTHON "If" Statement

Quiz
•
Computers
•
6th Grade
•
Medium
Fazla Fairooz
Used 398+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, what are if-statements used for?
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 Wayground
14 questions
Lists, Subroutines and Sequence in Pseudocode - Python

Quiz
•
1st - 11th Grade
13 questions
coding-01

Quiz
•
6th - 8th Grade
10 questions
Simple Easy Basic Lua Quiz

Quiz
•
4th Grade - Professio...
10 questions
Programming Fundamentals

Quiz
•
6th Grade
10 questions
computer

Quiz
•
6th Grade
9 questions
Python Quiz (More Loops)

Quiz
•
KG - 6th Grade
11 questions
G(6) Quiz L3.2 - 3.3

Quiz
•
6th Grade
8 questions
Roblox Lua Scripting Quiz

Quiz
•
1st - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
8 questions
Time Management

Quiz
•
6th Grade
15 questions
Acceptable Use Policy (Quiz)

Quiz
•
6th - 8th Grade
25 questions
Career Vs. Job

Quiz
•
6th - 8th Grade
20 questions
Copyright and Fair Use

Quiz
•
6th - 8th Grade
21 questions
Input Output Storage Device

Quiz
•
5th - 8th Grade