{"id":8507,"date":"2021-09-30T11:30:58","date_gmt":"2021-09-30T06:00:58","guid":{"rendered":"https:\/\/python-programs.com\/?p=8507"},"modified":"2021-11-22T18:35:27","modified_gmt":"2021-11-22T13:05:27","slug":"python-program-to-find-the-gravitational-force-acting-between-two-objects","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-the-gravitational-force-acting-between-two-objects\/","title":{"rendered":"Python Program to Find the Gravitational Force Acting Between Two Objects"},"content":{"rendered":"

Gravitational Force:<\/strong><\/p>\n

The gravitational force is a force that attracts any two mass-bearing objects. The gravitational force is called attractive because it always strives to pull masses together rather than pushing them apart. In reality, every thing in the cosmos, including you, is tugging on every other item! Newton’s Universal Law of Gravitation is the name for this. You don’t have a significant mass, thus you’re not dragging on those other objects very much. Objects that are extremely far apart do not noticeably pull on each other either. However, the force exists and can be calculated.<\/p>\n

Gravitational Force Formula :<\/strong><\/p>\n

Gravitational Force = ( G *\u00a0 m1 * m2 ) \/ ( r ** 2 )<\/strong><\/p><\/blockquote>\n

Given masses of two objects and the radius , the task is to calculate the Gravitational Force acting between the given two particles in Python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

mass1 = 1300012.67\r\nmass2 = 303213455.953\r\nradius = 45.4<\/pre>\n

Output:<\/strong><\/p>\n

The gravitational force of objects with masses 1300012.67 kg 303213455.953 kg  of radius= 45.4 = 12.761610184592419<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Enter the first mass of the object =2491855.892 \r\nEnter the second mass of the object =9000872 \r\nEnter the distance\/radius between the objects =50<\/pre>\n

Output:<\/strong><\/p>\n

The gravitational force of objects with masses 24918552.892 kg 23145689000872.0 kg of radius= 50.0 = 15394799.86164859<\/pre>\n

Program to Find the Gravitational Force Acting Between Two Objects in Python<\/h2>\n

We will write the code which calculates the gravitational force acting between the particles and print it<\/p>\n