我收到float
對象在嘗試對質量塊上的重力進行計算時出現無法調用的錯誤。浮動不可召回
def grav():
mass = float(input('Enter a mass[kg]: '))
dist = float(input('Enter a distance from the surface of earth [m]: '))
rad = 6.3781*10**6
me = 5.97219*10**24
gr = 6.67300*10**-11
f = ((gr((me)*(mass)))/((rad)+(dist)**2))
return f
grav()
它給在那裏一切都被計算
第7行,您錯過* gr * – MarshalSHI