class Particle:

    def __init__(self, mass, position, velocity, force):
        self.mass = mass
self.position = position
self.velocity = velocity
self.force = force

@property
def acceleration(self):
    return self.force / self.mass
particle = Particle(2, 3, 3, 8)
print(particle.acceleration)
Custom data structures in Python