Search Header Logo

9 DIS - Python Modules 1-3

Authored by Jackson RILEY

Information Technology (IT)

9th Grade

9 DIS - Python Modules 1-3
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 output of the following code? x = 5 y = 3 print(x + y)

2
8
53
15

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to take input from a user?

input = 5
name = input('Enter your name: ')
name == input('Enter your name')
print('Enter your name: ')

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python statement is used to check conditions?

while
for
if
check

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print? x = 10 if x > 5: print('x is greater than 5') else: print('x is not greater than 5')

x is not greater than 5
x is greater than 5
x = 10
Nothing will be printed

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this loop? for i in range(3): print(i)

0 1 2
1 2 3
0 1 2 3
1 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword can be used to immediately exit a loop in Python?

stop
exit
break
continue

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to assign a value to a variable in Python?

value = 10
10 == value
value == 10
10 = value

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?