Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I wanna python expert solutions and please if you cant do it fully dont post anything. Answers will be related to python oop PLEASE EXPLAIN

I wanna python expert solutions and please if you cant do it fully dont post anything. Answers will be related to python oop

PLEASE EXPLAIN THIS CODE STEP BY STEP (EVERYTHING)

image text in transcribed

class DataReader: def -init-(self): self. students = [] 3e1f.col titles = [] def read (self, filepath): fp open (filepath) lines tp.readlines() tp.close () tor i in range (o, len(1ines)): line lines[i].split("I") if (i--0): for col in 1ine: self.col_titles.append (col.strip)) else: student- tor j in range (0, len(self.col_titles)): studenttself.col titles 1ine.strip) self.students.append (student) def grade histogram (): grade_names ["AA, "BA","BB","CB","CC, "DC","DD""FD,"FF" counts-[0, 0, 0, 0, 0, 0, 0, 0, 0 or student in self.students: grade student"grade" ] index grade_names.index (grade) counts[index]1 for i in range (, len(counts)): print ("to [fdj: "$(grade-names[1], counts[1], "*"fcounts[1])) det average (type="total", exceptions=[], in-0, nax=100): avg 0.0 n 0.0 for student in self.students: if studentl"lastname"] in exceptions: continue score-float(student[ type]) if (score> in and scorec=max): avg += score n+= 1 return avg

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How are gender roles portrayed in the media?

Answered: 1 week ago

Question

How does selection differ from recruitment ?

Answered: 1 week ago