fork download
  1. # your code goes here
  2. score_list=[65, 92, 78, 90, 45, 83, 57, 96]
  3. score_dict={
  4. 'high':[],
  5. 'middle':[],
  6. 'low':[]
  7. }
  8. for score in score_list:
  9. if score>=90:
  10. score_dict['high'].append(score)
  11. elif score>=60:
  12. score_dict['middle'].append(score)
  13. else:
  14. score_dict['low'].append(score)
  15. print(score_dict)
  16.  
  17.  
Success #stdin #stdout 0.08s 14128KB
stdin
Standard input is empty
stdout
{'high': [92, 90, 96], 'middle': [65, 78, 83], 'low': [45, 57]}