Question
(PYTHON) I have a dictionary created by user input, and I need to take the values from that dictionary and arrange them in a list
(PYTHON) I have a dictionary created by user input, and I need to take the values from that dictionary and arrange them in a list for a grading system. It sorts them based off their integer value, assigning each value to a letter grade. The format is like this:
A: (value)
B: (value)
C: (value)
D: (value)
F: (value)
This is what I have now:
class_size=int(input("Please, enter the class size: ")) clas={} for x in range(class_size): student_name = input("Please, enter the student name: ") student_grade = int(input("Please, enter the student grade: ")) clas[student_name] = student_grade
print('Report of Grades')
How do I format this list using the dictionary input the way the program wants? student_grade are the values.
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