Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. content_ratings = {'4+': 4433, '12+': 1155, '9+': 987, '17+': 622}
  2. total_number_of_apps = 7197
  3. c_ratings_percentages = {}
  4. c_ratings_proportions = {}
  5.  
  6. for i in content_ratings:
  7.     proportions = content_ratings[i] / total_number_of_apps
  8.     percentages = proportions * 100
  9.    
  10.     c_ratings_proportions[i] = proportions
  11.     c_ratings_percentages[i] = percentages
  12. print(c_ratings_percentages)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement