Search Header Logo

Python Quiz

Authored by Servus Snap

Computers

University

Used 10+ times

Python Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

45 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is incorrect

a=!b

a!=b

a=[1,2,3]

B=(9,6,5)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output? :

a = "You're Pretty"

Print(a)

You're Pretty

"You're Pretty"

a

NameError: name 'Print' is not defined

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output for the below program:

A="Hyperboloid"

print(len("A")

11

911

12

1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does my_list.append(5) do?

Removes the last element from the list.

Creates a new list with only the number 5.

Appends the number 5 to the end of the list.

Adds 5 to the beginning of the list.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Used to define a function:

Def

def

define

Define

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output for the below program:

for i in range(10<11):

print(i)

10

11

0

Error: logical operators cannot be used inside range()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

[1,2,3,4,5,6,7,8,9,10]

1,2,3,4,5,6,7,8,9,10

[0,1,2,3,4,5,6,7,8,9]

0,1,2,3,4,5,6,7,8,9

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?

Discover more resources for Computers