Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please code in python DictionarvOfScores2 The student quiz scores are available as a dictionary. Each entry of the dictionary consists of a name and a
please code in python
DictionarvOfScores2 The student quiz scores are available as a dictionary. Each entry of the dictionary consists of a name and a score as follows Name Score b) The scores are expected to be between 0 and 100. Students scoring 60 orabove are passing, between 40 and 59 are marginal, and below 40 are failing. Write a Python function that prints the number of students that are passing, marginal and failing, in that order, in one line and separated by spaces Sample Input Sample Output ("alice" 10, "ann" 20, "Ali":100, "Tom" 80, Hossein": 40, "Eliz": 100) Note: Your code should be able to convert the sample input into the sample output. However, this is not enough to pass the challenge, because the code will be run on multiple test cases. Therefore, your code must solve this problem statement. Time Limit: 1.0 sec(s) for each input file Memory Limit: 256 MB Source Limit: 1024 KB Marking Scheme: Marks are awarded if any testcase passes Allowed Languages: Python 3 New Submission All Submissions Python 3 (python 3.5.2) Save 1 from ast import literal_eval 2- def print_scores(student dict): # your code here 4 # Do not modify the code below 6 result=[] 7 n= input() 8 student-dict= literal-eval(n) 9 print_scores(student_dict)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started