Create a python class called Grades. Grades should include four pieces of information as data attributes – a name(strin

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Create a python class called Grades. Grades should include four pieces of information as data attributes – a name(strin

Post by answerhappygod »

Create a python class called Grades.
Grades should include four pieces of information as data attributes
– a name(string), grade1(integer), grade2(integer),
grade3(integer). Grade1, grade2, and grade3 should have a
default value of 0. Your class should have an __init__ method
that initializes the four data attributes. Provide a read and write
property for each data attribute. Make each attribute private.
Grade1, grade2, grade3 should be a value that is 0-100 — use
validation in the properties for these data attributes to ensure
that they are valid.
Provide a calculate_average method that returns the average of
the grades.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply