Python dictionary

Flashcard
•
Others
•
University
•
Hard
Wayground Content
FREE Resource
Student preview

7 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which symbol surrounds a dictionary?
Back
{
2.
FLASHCARD QUESTION
Front
What data type is this?
quiz = {"Do you help out at home? ":"yes",
"Do you beleive in Santa? ":"yes"}}
Back
dictionary
3.
FLASHCARD QUESTION
Front
Given the dictionary person = {"name": "Alice", "age": 30}, how would you access Alice's age? Options: person[age], person["Alice", "age"], person.age, person["age"]
Back
person["age"]
4.
FLASHCARD QUESTION
Front
Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use? Options: d.delete(“john”:40), d.delete(“john”), del d[“john”], del d(“john”:40)
Back
del d[“john”]
5.
FLASHCARD QUESTION
Front
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
d["john"]
Back
40
6.
FLASHCARD QUESTION
Front
Items are accessed by their position in a dictionary and All the keys in a dictionary must be of the same type.
Back
False
7.
FLASHCARD QUESTION
Front
What is the output of the following dictionary operation: dict1 = {"name": "Mike", "salary": 8000}; temp = dict1.get("age"); print(temp)?
Back
None
Similar Resources on Wayground
7 questions
English Vocabulary Flashcards

Flashcard
•
KG - University
10 questions
CODE BREAKER

Flashcard
•
University
8 questions
Root Words Quiz

Flashcard
•
12th Grade
7 questions
2 w15 THURSDAY: Language Review

Flashcard
•
KG - University
8 questions
Gilded Age Review

Flashcard
•
11th Grade
11 questions
Figurative Language

Flashcard
•
KG - University
10 questions
Banking and Savings Accounts

Flashcard
•
12th Grade
15 questions
CSE 102 Exam 3 Practice

Flashcard
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Others
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University