Solution for NPTEL Programming, Data Structures and Algorithms using Python, Week 5 Programming Assignment

Solution :- Download Python File :- Download import operator input(”) class Stu: def __init__(self, name, fname): self.name = name self.fname = fname self.num = 0 self.total = 0 def add(self, gr): self.num +=1 if gr==”A”: self.total +=10 elif gr==”AB”: self.total+=9 elif gr==”B”: self.total+=8 elif gr==”BC”: self.total+=7 elif gr==”C”: self.total+=6 elif Read more…