Search Header Logo

Python Input and Conditionals

Authored by Nicholas Marsh

Computers

12th Grade

Used 4+ times

Python Input and Conditionals
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the input() function in Python?

To display output

To perform mathematical calculations

To allow user input

To import modules

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for an if statement in Python?

if (condition)

if [condition]

if {condition}

if condition:

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the else statement in Python?

To terminate the execution of the program.

To specify a block of code to be executed if the condition in the if statement is false.

To define a new condition for the if statement.

To specify a block of code to be executed if the condition in the if statement is true.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these IS NOT a comparison operator in Python?

==

!=

>

?

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression '5 == 5'?

error

5

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression '10 != 5'?

5

True

10

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression '7 > 3'?

7

True

False

3

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?