Question: Problem PQ 5 . Writing Object - Oriented Python Code. ( a ) [ 1 5 points ] Complete the code below for an Element
Problem PQ Writing ObjectOriented Python Code.
a points Complete the code below for an Element class.
It will have attributes for symbol, atomic number, and atomic weight. For example,
helium has symbol He atomic number and atomic weight
Write a parameter constructor init that can be used to set all three attributes,
with default attribute values of and respectively.
Write getter and setter instance methods for the atomic number only.
class Element:
b points Add Python statements to create an application program below that i creates
and initializes the Element object helium using your constructor and all three of its actual
attribute values listed above; ii creates an list of objects that could be used for all
elements of the periodic table, but with only the atomic number initialized to a nondefault
value.
# test the Element class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
