Skip to content

Instantly share code, notes, and snippets.

@Moderrek
Created December 8, 2023 20:36
Show Gist options
  • Save Moderrek/88be4dd20cc4e1a403bba84c34ffe937 to your computer and use it in GitHub Desktop.
Save Moderrek/88be4dd20cc4e1a403bba84c34ffe937 to your computer and use it in GitHub Desktop.
Earth mass
from scipy.constants import G
# F = G * (M1 * M2 / r2)
M1 = 1
F = 9.81
r = 6_371_000
# M2 = F * r2 / G / M1
M2 = F * pow(r, 2) / G / M1
print(f"Earth mass: {M2}kg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment