Write a complete python program to do the following; Repeatedly ask the user to enter a student name and in how many subjects the student has qualified and in how many not qualified. Store this information in a dictionary where the keys are the student names and the values are a list of the form [qualified, non-qualified].
(i) Using the dictionary created above, allow the user to enter a student name and print out the student’s qualifying percentage.
(ii) Using dictionary create a list whose entries are the number of qualified subjects for each student. (iii) Using the dictionary, create a list of all those students who have qualifying records 100%
there are 10 subjects
pls help urgent for exam
Answers
Answer:
Consider a software for maintaining records of the students in a class. Consider the following functions which are required to be performed:
Sorting of names according to First Name of the students.
Finding the Minimum marks among all the marks
Finding contact number of student using his/her First Name.
The task is to write a Python program to implement the software having these three functionalities.
Approach: For the above problem we should use a dictionary that either takes a name as a whole to key and other data as value to it or vice versa. Here I have taken the name as a key and contact number, marks as the value associated with the name. So at first the user needs to enter the details of the students and these details will be stored in dictionary as {[‘first name’, ‘second name’]:(‘contact number’, ‘marks’)}. Then we create a new list of tuples that store data according to the function requirement. In the program four user-defined functions have been created:
Explanation:
Hope it helps you
Please mark me as the brainliest and drop some thanks