Python Quizz-11

Python Quizz-11

University

10 Qs

quiz-placeholder

Similar activities

Python Dictionaries

Python Dictionaries

University

10 Qs

OCR A Level Computer Science (H446) - Component 1.3.1 - Compression, Encryption and Hashing

OCR A Level Computer Science (H446) - Component 1.3.1 - Compression, Encryption and Hashing

11th Grade - University

9 Qs

Python Module 1

Python Module 1

University - Professional Development

13 Qs

cd125A_python for data science-Quiz2_2024_2025

cd125A_python for data science-Quiz2_2024_2025

University

12 Qs

Pre tes Prisma Sisfor Last Eps

Pre tes Prisma Sisfor Last Eps

University

10 Qs

Relational Database Model

Relational Database Model

University

12 Qs

PDS-QUIZ-II

PDS-QUIZ-II

University

12 Qs

QUIZZY FIZZY 3

QUIZZY FIZZY 3

University

15 Qs

Python Quizz-11

Python Quizz-11

Assessment

Quiz

Computers

University

Medium

Created by

shilpa gupta

Used 24+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements create a dictionary?

d = {}

d = {“john”:40, “peter”:45}

d = {40:”john”, 45:”peter”}

All of the mentioned

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

print("john" in d)

True

False

None

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

d1 = {"john":40, "peter":45}

d2 = {"john":466, "peter":45}

print(d1 == d2)

True

False

None

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

d1 = {"john":40, "peter":45}

d2 = {"john":466, "peter":45}

print(d1 > d2)

True

False

Error

None

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

d = {"john":40, "peter":45}

print(d["john"])

45

40

john

error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?

d.size()

len(d)

size(d)

d.len()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

d = {"john":40, "peter":45}

print(list(d.keys()))

[“john”, “peter”]

[“john”:40, “peter”:45]

(“john”, “peter”)

(“john”:40, “peter”:45)

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?