Consider the planets in our solar system orbiting the Sun. The force of gravity between the Sun and the planets keeps the planets in their orbits. Gravity provides the centripetal force needed to maintain their circular paths. This gravitational attraction depends on the masses of the objects and the distance between them. Reflecting on the role of gravity in celestial orbits, which statement best describes this phenomenon?
A) Gravity only affects objects on Earth, not in space.
B) Gravity keeps the planets in their orbits by providing a centripetal force.
C) The planets orbit the Sun due to magnetic forces.
D) The gravitational force between the Sun and planets increases with distance.