Draw This - beginner
Draw a diagram to represent a dictionary that stores the names of three fruits as keys and their colors as values. Use the following data: Apple - Red, Banana - Yellow, Grape - Purple.
5 minutes
Hint 1
Hint 2
Hint 3
Draw a diagram to represent a dictionary that stores the names of three fruits as keys and their colors as values. Use the following data: Apple - Red, Banana - Yellow, Grape - Purple.
+---------+ +-------+ | Apple | ----> | Red | +---------+ +-------+ +----------+ +---------+ | Banana | ----> | Yellow | +----------+ +---------+ +---------+ +---------+ | Grape | ----> | Purple | +---------+ +---------+
This diagram shows a dictionary with three key-value pairs. Each key (fruit name) is inside a box on the left. An arrow points from each key to its value (color) on the right. This visually represents how a dictionary stores data: each key is linked to a specific value.
For example, the key "Apple" points to the value "Red", meaning the color of an apple is red. Similarly, "Banana" points to "Yellow", and "Grape" points to "Purple".