def angular_momentum(point, frame, *body):
 if (not isinstance(frame, ReferenceFrame)):
  raise TypeError('Please enter a valid ReferenceFrame')
 if (not isinstance(point, Point)):
  raise TypeError('Please specify a valid Point')
 else:
  angular_momentum_sys = Vector(0)
  for e in body:
   if isinstance(e, (RigidBody, Particle)):
    angular_momentum_sys += e.angular_momentum(point, frame)
   else:
    raise TypeError('*body must have only Particle or RigidBody')
 return angular_momentum_sys

def angular_momentum ( point , frame , * body ) : if ( not isinstance ( frame , ReferenceFrame ) ) : raise TypeError ( 'Please enter a valid ReferenceFrame' ) if ( not isinstance ( point , Point ) ) : raise TypeError ( 'Please specify a valid Point' ) else : angular_momentum_sys = Vector ( 0 ) for e in body : if isinstance ( e , ( RigidBody , Particle ) ) : angular_momentum_sys += e . angular_momentum ( point , frame ) else : raise TypeError ( '*body must have only Particle or RigidBody' ) return angular_momentum_sys
angular momentum of a system this function returns the angular momentum of a system of particles and/or rigidbodys .