CodeHS - Intro to Python - Conditionals Quiz

CodeHS - Intro to Python - Conditionals Quiz

9th Grade - Professional Development

15 Qs

quiz-placeholder

Similar activities

Syntax and Logic Errors

Syntax and Logic Errors

9th - 11th Grade

12 Qs

Python - lists,loops,basics

Python - lists,loops,basics

9th - 11th Grade

20 Qs

Debugging Python Code Errors Quiz

Debugging Python Code Errors Quiz

10th Grade

10 Qs

Python Syntax

Python Syntax

10th Grade

16 Qs

CodeHS Python

CodeHS Python

9th Grade - Professional Development

15 Qs

CodeHS JavaScript Control Functions

CodeHS JavaScript Control Functions

9th - 12th Grade

15 Qs

CodeHS Python Unit 4 Quiz

CodeHS Python Unit 4 Quiz

9th - 12th Grade

15 Qs

For Loop python

For Loop python

5th - 12th Grade

19 Qs

CodeHS - Intro to Python - Conditionals Quiz

CodeHS - Intro to Python - Conditionals Quiz

Assessment

Quiz

Computers

9th Grade - Professional Development

Hard

Created by

Thomas Archer

Used 99+ 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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?