0
Python Dictionary
Hello guys. I am new to Python and I can not solve this problem. "Build a dictionary list (data structure) where to store the following student data: Name, surname, branch, year, subjects of the current year, subjects taken and their grade, subjects failed with python programming". We have not taken yet sort or select functions. Any idea please ?
5 odpowiedzi
+ 4
I can review your code, but I will not write it for you. You need to show some effort!
You can learn the basics even on Sololearn. Lists are explained in Python Beginner course, Lesson 29. And the Python Intermediate course starts with dict. These lessons explain nicely, how to use these structures.
+ 1
Alright Tibor. Thank you
0
dictionary: {}
list: []
There is no such data structure as "dictionary list".
Maybe they mean a list of dictionaries? 🤔
So each student would be a dict, with the attribute names as keys.
And you put each student in a list.
In serious applications this would be solved with object oriented programming.
I am sure the task wants you to reflect on the lessons that you already should have learned. Maybe review those and you will have some idea how a dict and list works?
0
yes its true. Sorry for that. So I need a code where we use a dictionary to store name,last name,rolling year,subjects passed and subjects failed. Sorry for tha translation
0
if you can help me please Id be very grateful