Python Dictionary | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 ?

29th Nov 2022, 7:01 PM
Amarildo Mahilaj
Amarildo Mahilaj - avatar
5 Answers
+ 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.
29th Nov 2022, 7:38 PM
Tibor Santa
Tibor Santa - avatar
+ 1
Alright Tibor. Thank you
29th Nov 2022, 7:40 PM
Amarildo Mahilaj
Amarildo Mahilaj - avatar
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?
29th Nov 2022, 7:24 PM
Tibor Santa
Tibor Santa - avatar
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
29th Nov 2022, 7:31 PM
Amarildo Mahilaj
Amarildo Mahilaj - avatar
0
if you can help me please Id be very grateful
29th Nov 2022, 7:32 PM
Amarildo Mahilaj
Amarildo Mahilaj - avatar