
Python Quizz-11

Quiz
•
Computers
•
University
•
Medium
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
Similar Resources on Wayground
15 questions
013_Encrypting Data - CompTIA Security+ SY0-701 - 1.4

Quiz
•
12th Grade - University
8 questions
Perl and Java

Quiz
•
University
10 questions
Python Dictionaries

Quiz
•
University
9 questions
OCR A Level Computer Science (H446) - Component 1.3.1 - Compression, Encryption and Hashing

Quiz
•
11th Grade - University
13 questions
Python Module 1

Quiz
•
University - Professi...
12 questions
Relational Database Model

Quiz
•
University
15 questions
Data Structures Activity - 1

Quiz
•
University
10 questions
ias615: Group 1 : Computer Attack (Part 1)

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade