<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def semimajor(P,mstar=1):
 """Returns semimajor axis in AU given P in days, mstar in solar masses. """

    return ((P*DAY/2/np.pi)**2*G*mstar*MSUN)**(1./3)/AU