Programming Data Structures And Algorithms Using Python Assignment 5 Answers 2022

Programming Data Structures And Algorithms Using Python Assignment 5

Are you looking for the Answers to NPTEL Programming Data Structures And Algorithms Using Python Assignment 5? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course “ NPTEL Programming Data Structures And Algorithms Using Python Assignment 5

What is Programming Data Structures And Algorithms Using Python?

While hard skills teach us what to do, soft skills tell us how to apply our hard skills in a social environment. The focus of the course is to develop a wide variety of soft skills starting from communication, to working in different environments, developing emotional sensitivity, learning creative and critical decision making, developing awareness of how to work with and negotiate with people and to resolve stress and conflict in ourselves and others. 
The uniqueness of the course lies in how a wide range of relevant issues are raised, relevant skills discussed and tips for integration provided in order to make us effective in workplace and social environments.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Below you can find the answers for Programming Data Structures And Algorithms Using Python Assignment 5

Assignment No.Answers
Programming Data Structures Assignment 1 Click Here
Programming Data Structures Assignment 2 Click Here
Programming Data Structures Assignment 3 Click Here
Programming Data Structures Assignment 4 Click Here
Programming Data Structures Assignment 5 Click Here
Programming Data Structures Assignment 6 Click Here
Programming Data Structures Assignment 7 Click Here
Programming Data Structures Assignment 8 Click Here

Programming Data Structures And Algorithms Using Python Assignment 5 Answers:-

Q1. The academic office at the Hogwarts School of Witchcraft and Wizardry has compiled data about students’ grades. The data is provided as text from standard input in three parts: information about courses, information about students and information about grades. Each part has a specific line format, described below..

  1. Information about courses
    Line format: Course Code~Course Name~Semester~Year~Instructor
  2. Information about students
    Line format: Roll Number~Full Name
  3. Information about grades
    Line format: Course Code~Semester~Year~Roll Number~Grade

The possible grades are A, AB, B, BC, C, CD, D with corresponding grade points 10, 9, 8, 7, 6, 5 and 4. The grade point average of a student is the sum of his/her grade points divided by the number of courses. For instance, if a student has taken two courses with grades A and C, the grade point average is 8.50 = (10+7)÷2. If a student has not completed any courses, the grade point average is defined to be 0.

You may assume that the data is internally consistent. For every grade, there is a corresponding course code and roll number in the input data.

Each section of the input starts with a line containing a single keyword. The first section begins with a line containing Courses. The second section begins with a line containing Students. The third section begins with a line containing Grades. The end of the input is marked by a line containing EndOfInput.

Write a Python program to read the data as described above and print out a line listing the grade point average for each student in the following format:

Code:-

def Gvalue(code):
        if code=="A":
                return(10)
        if code=="AB":
                return(9)
        if code=="B":
                return(8)
        if code=="BC":
                return(7)
        if code=="C":
                return(6)
        if code=="CD":
                return(5)
        if code=="D":
                return(4)
        
# varibles used for storing data

ROLL_GRADEsum={}
Roll_course_count={}
Roll_name={}

#COURSES INPUT SECTION

type_course=input()
enter_course_detail=input()
next_input=input()
while(next_input!="Students"):
        next_input=input()

#STUDENT INPUT SECTION
        
#if it fails in courses section then 
#it will automatically enter students
#contact us at youtube.com/c/getpythoncode
        
roll,name=input().split('~')
Roll_name[roll]=name
ROLL_GRADEsum[roll]=0
Roll_course_count[roll]=0
next_input=input()
while('~' in next_input):
    roll,name=next_input.split('~')
    Roll_name[roll]=name
    ROLL_GRADEsum[roll]=0
    Roll_course_count[roll]=0
    next_input=input()

#GRADES INPUT SECTION

code,sem,year,Rnum,grade=input().split('~')
if Rnum in ROLL_GRADEsum.keys():
    ROLL_GRADEsum[Rnum]=ROLL_GRADEsum[Rnum]+Gvalue(grade)
    Roll_course_count[Rnum]=Roll_course_count[Rnum]+1
next_input=input()
while(next_input!="EndOfInput"):
    code,sem,year,Rnum,grade=next_input.split('~')
    if Rnum in ROLL_GRADEsum.keys():
        ROLL_GRADEsum[Rnum]=ROLL_GRADEsum[Rnum]+Gvalue(grade)
        Roll_course_count[Rnum]=Roll_course_count[Rnum]+1
    next_input=input()
    
#print(Roll_course_count)
#print(ROLL_GRADEsum)
#print(Roll_name)

#RESULT COMPUTATION
    
Sort_roll=sorted(Roll_name)
for key in Sort_roll:
    if ROLL_GRADEsum[key]!=0:
        ans=round((ROLL_GRADEsum[key]/Roll_course_count[key]),2)
        print(key+"~"+Roll_name[key]+"~"+str(ans))
    else:
        print(key+"~"+Roll_name[key]+"~"+"0")

For other courses answers:- Visit

For Internship and job updates:- Visit

Disclaimer: We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.

if you have any suggestions then comment below or contact us at [email protected]

If you found this article Interesting and helpful, don’t forget to share it with your friends to get this information.