Practice Summary of Dictionaries - 23.1.14 | 23. Tuples and dictionaries | Data Structures and Algorithms in Python
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Academics
Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Professional Courses
Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβ€”perfect for learners of all ages.

games

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

Create a dictionary to store three fruits and their prices.

πŸ’‘ Hint: Use fruit names as keys and their prices as values.

Question 2

Easy

Access the price of 'banana' from the dictionary you created.

πŸ’‘ Hint: The key is 'banana'.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What is the data type used for keys in a Python dictionary?

  • Mutable types
  • Immutable types
  • Any types

πŸ’‘ Hint: Think about what dictionaries use to access values.

Question 2

True or False: You can have duplicate keys in a dictionary.

  • True
  • False

πŸ’‘ Hint: Consider the purpose of keys.

Solve 2 more questions and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Create a nested dictionary for three sports teams, with each team having players and their respective scores. Write a function to calculate the total score for each team.

πŸ’‘ Hint: Loop through team names and sum their player scores.

Question 2

Given a dictionary representing book titles and authors, write a function that returns a list of authors whose names start with a vowel.

πŸ’‘ Hint: Filter authors by checking the first letter.

Challenge and get performance evaluation