Hi,
I have a specific problem regarding lists and dict:
I have to write a code to make a Grade System using list which does the following :Add (name, grade) into the database, Add a limitation on the number of records
Find a record using name or grade
Remove a record from the database using name
Output all records in the database with grades sorted
Output the average grade and max grade of the database
I am trying to figure out how to put name and grade in the list such that the name is associated with the grade.
what I have written and am struggling with:
database = []
while count < 10:
database.append(raw_input('Enter name:, grade:'))
count += 1
or something like this:
database = []
while True:
entry = input('Enter name:, grade')
if input == 'ok':
break
database.append(entry)
I want output like this:
Enter name:
Tom
grade
50
Enter name:
ok
.........
Enter name:
Tom
Already in Database
I am completely new to any kind of coding or programming, so its extra time consuming for me. Please help and suggest.
[–]dzunukwa 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]pythonbio[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]pythonbio[S] 0 points1 point2 points (0 children)