human
Give me a the Python program you requested given the following:
I am working on the file "Intro_to_OO.ipynb".
The first task is:
As you modify your Class all of the methods within the Class know about the modifications.
For example: Let us add some more attributes to our Asteroid data.
Can you write Python program for it?
assistant
#Here is the Python program you requested.

class SpaceRock(object):
    
    def __init__(self, name = None, ab_mag = None, albedo = None, 
                 semi_major= None, ecc = None):
        
        self.name = name
        self.ab_mag = ab_mag
        self.albedo = albedo
        self.semi_major = semi_major
        self.ecc = ecc
        
    def diameter(self):
        result = (1329.0 / np.sqrt(self.albedo)) * (10 ** (-0.2 * self.ab_mag))
        return result * u.km
    
    def two_diameter(self):
        result = 2.0 * self.diameter()
        return result
    
    def find_perihelion(self):
        result = self.semi_major * ( 1.0 - self.ecc )
        return result * u.AU
    

another_rock_table = QTable.read('PHA.csv', format='ascii.csv')

print(another_rock_table)

name = another_rock_table['Name']
ab_mag = another_rock_table['H']
albedo = another_rock_table['A']
semi_major = another_rock_table['a']
ecc = another_rock_table['ecc']

more_rocks = SpaceRock(name=name, ecc = ecc, semi_major=semi_major, ab_mag=ab_mag, albedo=albedo)

more_rocks.diameter()

more_rocks.find_perihelion()

for Idx,Value in enumerate(more_rocks.find_perihelion()):
    
    rock_name = more_rocks.name[Idx]
    
    my_string = "The Asteroid {0} has a perihelion distance of {1:.2f}".format(rock_name, Value)
    
    print(my_string)