Screen Link: https://app.dataquest.io/m/314/dictionaries-and-frequency-tables/11/keeping-the-dictionaries-separate
My Code:
content_ratings = {'4+': 4433, '12+': 1155, '9+': 987, '17+': 622}
total_number_of_apps = 7197
c_ratings_percentage = {}
c_ratings_proportion = {}
for rating in content_ratings:
porportion = content_ratings[rating] / total_number_of_apps
percentage = porportion * 100
c_ratings_porportion[rating] = porportion
c_ratings_percentage[rating] = percentage
What I expected to happen:
Find the porportiosn and percentages in the list
What actually happened:
it says their was an error
Replace this line with the output/error
Your code doesn’t seem to have the correct side-effects. Please re-check the instructions and your code.”