PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
Here is a great example of why Sololearn uses and needs to use hidden cases.
The task is under the lesson Dictionaries of the Python Core course.
You have been asked to create an inventory management program for a store. You use a dictionary to track all of the store's inventory along with how many of each item the store has.
Complete the provided code to output the number of apples present in the store.
"""
store = {"Orange": 2, "Watermelon": 0, "Apple": 8, "Banana": 42}
#your code goes here
"""
One could simply output 8 and achieve the green tick. That person has not understood the task or the concept of what a Dictionary is.
"""
print(8) =/= print(store["Apple"])
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run