#Names: Soham Gandhi, Joshua Zhang, Alby Alex

import math, time, sys, re
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
radii = [4.1e8, 6.62e8, 1.07e9, 1.89e9]
radii = np.array([R*R*R for R in radii])
times = [146880, 302400, 613440, 1442880]
times = np.array([T*T for T in times])
m, b = np.polyfit(radii, times, 1)
plt.figure()
plt.scatter(radii, times)
plt.plot(radii, m*radii + b)
plt.ylabel("T^2 (s^2)")
plt.xlabel("R^3 (m^3)")
print("Slope of line: " + str(m))