Practice Processing A Dictionary (23.1.9) - Tuples and dictionaries - Data Structures and Algorithms in Python
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Processing a Dictionary

Practice - Processing a Dictionary

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

What is a dictionary in Python?

💡 Hint: Think about how we can access values using names.

Question 2 Easy

How do you create an empty dictionary?

💡 Hint: How do you define a collection in Python?

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What method would you use to get all keys from a dictionary?

get_keys()
keys()
all_keys()

💡 Hint: Remember the syntax?

Question 2

True or False: You can use a list as a key in a dictionary.

True
False

💡 Hint: Think about what types are permissible for keys.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Create a dictionary where players are keys and their scores for different matches are nested dictionaries.

💡 Hint: Start by creating each player's main dictionary and then adding another layer for scores.

Challenge 2 Hard

Write a function that accepts a dictionary of names and scores and calculates the average score.

💡 Hint: Think about how to traverse the dictionary.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.