Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedplease 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

What is focal length? Explain with a diagram and give an example.

Answered: 1 week ago

Question

What is physics and how does it apply in daily life?

Answered: 1 week ago