While I was chatting on some space forum, I`ve bumped into one interesting question. And I decided to post it here.
Why do different planets orbit the Sun faster? Not distance but speed. If you have some ideas, please share your information with me
Here below is a python program which calculates weights of two different objects at different distances. It could answer this question here.
Python:
# Python Program to Calculate Gravitational Force
# setting value of Gravitational Constant
# Reading weight and distance
while True:
G = (.00000000006674)
m1 = int(input('Enter weight of first body (Kg): '))
m2 = int(input('Enter weight of second body (Kg): '))
r = int(input('Enter distance (m): '))
# Calculating Gravitational Force
F = (((G * m1) * m2) / r**2)
# Displaying result
print(m1,'Weight of First Body Kg')
print(m2,'Weight of Second Body Kg')
print('{0:.100f}'.format(F),'Gravitational Force')
print('{0:.14f}'.format(G),'Gravitational Constant')
You can do an experiment with the code of 10Kg vs 100Kg at two different distances (from 1 meters to 10 meters) and when the two are closer the gravitational force goes up. I assume this would accelerate a body when closer to its heavier counter part than further out.
Output for 1 meter vs 10 at weights of 10Kg vs. 100Kg:
Enter weight of first body (Kg): 10
Enter weight of second body (Kg): 100
Enter distance (m): 1
10 Weight of First Body Kg
100 Weight of Second Body Kg
0.0000000667400000000000007280097748599279050552013359265401959419250488281250000000000000000000000000 Gravitational Force
0.00000000006674 Gravitational Constant
Enter weight of first body (Kg): 10
Enter weight of second body (Kg): 100
Enter distance (m): 10
10 Weight of First Body Kg
100 Weight of Second Body Kg
0.0000000006673999999999999907364854975387255531238395178661448881030082702636718750000000000000000000 Gravitational Force
0.00000000006674 Gravitational Constant