Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Suppose that the following two dictionaries describe the scores of two classes for the same course. Please draw a bar chart to visualize them
2 Suppose that the following two dictionaries describe the scores of two classes for the same course. Please draw a bar chart to visualize them using Matplotlib. In this bar chart, y direction means the number of students, x direction shows grades' names. After drawing such chart, please save it to be a jpg file. class1 = {'excellent': 8, 'good': 10, 'pass': 15, 'failure': 6} class2 = {'excellent': 5, 'good': 13, 'pass': 13, 'failure': 8} (15.05) 1 Write a function as 'get_position' to return a string for indicating the position of an ordinal number, such as '1st' for 1, '2nd' for 2, '3rd' for 3, other cases like '4th' for 4. Then call the function 'get_position' by looping from 1 to 9, and print out the position for each number. (15.03)
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