Problem Description
Write a Python Program to Find the Gravitational Force Acting Between Two ObjectsCODING ARENA
m1=float(input())
m2=float(input())
r=float(input())
G=6.673*(10**-11)
f=(G*m1*m2)/(r**2)
print(round(f,2),"N")
Test Case 1
Input (stdin)1000000 500000 20
Expected Output0.08 N
Test Case 2
Input (stdin)90000000 700000 20
Expected Output10.51 N
No comments:
Post a Comment