Python Quiz

Python Quiz

University

22 Qs

quiz-placeholder

Similar activities

Asikin ajaa kuyy!

Asikin ajaa kuyy!

University

20 Qs

UMMSS Blue Week Trivia (3)- Stats,Geography

UMMSS Blue Week Trivia (3)- Stats,Geography

University

20 Qs

Mario 2

Mario 2

KG - Professional Development

18 Qs

model fy

model fy

University

20 Qs

Biblia- Cultura general

Biblia- Cultura general

1st Grade - Professional Development

20 Qs

Meelelahutuslik aastavahetus

Meelelahutuslik aastavahetus

1st Grade - University

20 Qs

FINAL SESSION

FINAL SESSION

University

20 Qs

L'Observatoire de la Capitale

L'Observatoire de la Capitale

University

20 Qs

Python Quiz

Python Quiz

Assessment

Quiz

Fun

University

Practice Problem

Hard

Created by

Sirada Pittayakornpisuth

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code:
print 9//2

4.5

4.0

4

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

For the dictionary above, what expression returns the value 100?

d[foo]

d(foo)

d[[foo]]

d[foo:foo]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the list above, what expression returns the value 20?

x[1[1]]

x[1,1]

x[1][1]

x[1][2]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is NOT a core data type?

Lists

Dictionaries

Tuples

Functions

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type is this object?

L = [1, 23, 'hello', 1]

Dictionary

List

Tuple

Array

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following functions converts a string to a float in python?

int()

long()

float()

str()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this program below:

nameList = ['Harsh', 'Pratik', 'Bob', 'Dhruv']

 

pos = nameList.index("GeeksforGeeks")

 

print (pos * 3)

Harsh

Harsh Harsh Harsh

GeeksforGeeks GeeksforGeeks GeeksforGeeks

ValueError: 'GeeksforGeeks' is not in list

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?