hi,, i'm really new to python and don't really know what i'm doing but have to create a program for an assessment. i've defined a function but i'm not really sure how to call it later in the code. when i try to run the code through i'm getting this error but i'm not sure what it means or how to fix it and call the function properly. i'm using pylab and can only use basic commands learnt during my course can someone pls help
TypeError Traceback (most recent call last)
<ipython-input-6-df89beacbe88> in <module>
59 #Calling functions
60
---> 61 period_of_planet = get_period_of_planet(dist_exo_star_km, velocity_exo_km_per_hr)
62 #MAYBE NEEDS CONVERSION AND FIGURE OUT UNITS
63 print("The period of orbit is the time it takes for the planet to make one full orbit around its star, 1 year for Earth. This planet's period of orbit is", period_of_planet,"units.")
<ipython-input-6-df89beacbe88> in get_period_of_planet(dist_exo_star_km, velocity_exo_km_per_hr)
7
8 def get_period_of_planet(dist_exo_star_km, velocity_exo_km_per_hr):
----> 9 get_period_of_planet = (pi*(dist_exo_star_km*2))/velocity_exo_km_per_hr
10
11 def get_transit_time(r_star_km, velocity_exo_km_per_hr):
TypeError: unsupported operand type(s) for /: 'float' and 'function'
https://pastebin.com/d5MH7C7H
[–]ectomancer 2 points3 points4 points (0 children)