Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.
Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβperfect for learners of all ages.
Test your understanding with targeted questions related to the topic.
Question 1
Easy
What is a dictionary in Python?
π‘ Hint: Think about how pairs of items are stored.
Question 2
Easy
Can you use a list as a key in a dictionary?
π‘ Hint: Recall the definition of mutable vs immutable.
Practice 4 more questions and get performance evaluation
Engage in quick quizzes to reinforce what you've learned and check your comprehension.
Question 1
Which of the following can be used as a key in a Python dictionary?
π‘ Hint: Consider which types cannot change.
Question 2
True or False: Dictionary values can be mutable.
π‘ Hint: Think about what types we can store as values without restrictions.
Solve and get performance evaluation
Push your limits with challenges.
Question 1
Design a nested dictionary structure to store scores of students in multiple subjects. Then write code to print each student's subject and score.
π‘ Hint: Consider how you can access nested dictionaries using multiple keys.
Question 2
Create a dictionary with at least five fruits and their prices. Write a function that takes a fruit name and returns its price. Handle cases where the fruit might not exist.
π‘ Hint: Think about using the `get` method to avoid key errors.
Challenge and get performance evaluation