Python Program to Find the Gravitational Force Acting Between Two Objects.
Input:
First Line :Value of first mass
Second Line:Value second mass
Third Line: Distance between the centres of the masses
import math mass1=int(input("Enter the mass of object 1: ")) mass2=int(input("Enter the mass of object 2: ")) dist=int(input("Enter the distance between objects: ")) GF=(((6.67*(10**-11))*mass1*mass2)/(dist**2)) # gravitational constant = 6.67*10^-11 print("The GForce acting between 2 objects is {0:.2f} N".format(GF))
Input:
Enter the mass of object 1: 1000000
Enter the mass of object 2: 500000
Enter the distance between objects: 20
Output:
The GForce acting between 2 objects is 0.08 N
More Codes to Fcuk
- Alphabet pyramid
- Find prime numbers between lower and upper ranges
- Prime Factor
- Find the sum of positive even numbers
- An integer interval [a,b], Find the minimum size of a set S.
- Country A and B, how many years the population of A surpasses B.
- Identify pH level
- Find the Perfect Number
- Find out if a word is a palindrome or not
- Find next Palindrome of N number.
- The writing bot Question. A scientist has created a writing bot. Read and write activity needs to be captured.
- Total Number of Odds in the list
- Partition this string into as many parts as possible.
- Leap year
- LCM of two numbers
- Greatest of three numbers
- Find the Gravitational Force Acting Between Two Objects.
- Find the missing element in geometric progression
- Find the GCD Greatest common divisor
- convert a given float number to integer