What will print to the screen when the following program is run?
number = 5
greater_than_zero = number > 0
print(type(number))
CodeHS - Intro to Python - Conditionals Quiz
Quiz
•
Computers
•
9th Grade - Professional Development
•
Hard
Thomas Archer
Used 98+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will print to the screen when the following program is run?
number = 5
greater_than_zero = number > 0
print(type(number))
5
True
<type ‘int’>
<type ‘bool’>
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will print to the screen when the following program is run?
number = 5
less_than_zero = number < 0
print(type(less_than_zero))
5
False
<type ‘int’>
<type ‘bool’>
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of this program?
number = 5
greater_than_zero = number > 0
if greater_than_zero:
print(number)
0
5
True
Nothing will print
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of this program?
number = 5
greater_than_zero = number > 0
if greater_than_zero:
if number > 5:
print(number)
0
5
True
Nothing will print
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of this program?
number = 5
less_than_zero = number < 0
if less_than_zero:
print(number)
number = number - 10
less_than_zero = number < 0
if less_than_zero:
print(number)
5
5
-5
5
-5
Nothing will print
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be the output of this program?
number = 5
greater_than_zero = number > 0
less_than_zero = number < 0
if greater_than_zero:
print(number)
if less_than_zero:
print(number + 1)
if greater_than_zero and less_than_zero:
print(number + 2)
if greater_than_zero or less_than_zero:
print(number + 3)
5
5
7
5
7
8
5
8
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following program print when run?
above_16 = True
has_permit = True
passed_test = False
if above_16 and has_permit and passed_test:
print("Issue Driver's License")
elif above_16 or has_permit or passed_test:
print("Almost eligible for Driver's License")
else:
print("No requirements met.")
Issue Driver’s License
Almost eligible for Driver’s License
No requirements met
Nothing will print
15 questions
Python Conditionals and If Statements
Quiz
•
8th Grade - University
17 questions
Python Conditionals
Quiz
•
9th - 11th Grade
15 questions
Python бағдарламалау тілі
Quiz
•
11th Grade
10 questions
Functions and Parameters Summative preview
Quiz
•
9th - 12th Grade
20 questions
Python Basics 2
Quiz
•
9th - 12th Grade
10 questions
Python Boolean and If
Quiz
•
9th - 12th Grade
20 questions
PEMROGRAMAN DASAR PYTHON
Quiz
•
11th Grade
10 questions
KS4 Programming Techniques (1)
Quiz
•
8th - 10th Grade
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
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
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
10 questions
Identifying equations
Quiz
•
KG - University