 "# QUESTION 7: First create your function by copying and pasting your equations for r and v\n",
    "# below the 'def' statement in the space provided. Make sure you keep the indents! \n",
    "\n",
    
    
    "def calc_r_and_v(theta_rad, a, e, M):\n",
    "    "r**(1/3) = [(T**2 * G*M)/(4 * pi**2)]\n",
    "    "r = [(T**2 * G*M)/(4 * pi**2)]**3\n"
    "    "v = (2*pi*R)/T\n",
    "    return r, v\n",
    "\n",
    "# We have told the function to return r and v arrays, given the inputs\n",
    "# The rest of the code is NOT indented because it is not part of the function! \n",
    "# You need to ensure that theta_rad is an array! There are tests you can do to ensure the \n",
    "# variable type is correct in a function like this, but we will leave that for another day.\n",
    "\n",
    "# Once you've defined the function, you can use it. Because our function returns TWO arrays,\n",
    "# we need to call it with two variables for them to go into:\n",
    "\n",
    "r_array, v_array = calc_r_and_v(theta_rad, a, e, M)\n",
    "\n",
    "# Print out a few numbers to check that you have arrays as outputs\n",
    "# and so you can see if your values match what you had earlier! \n",
    "r_array[0:5].to(u.au)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-75-df5690174617>, line 13)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  File \u001b[0;32m\"<ipython-input-75-df5690174617>\"\u001b[0;36m, line \u001b[0;32m13\u001b[0m\n\u001b[0;31m    e1 =\u001b[0m\n\u001b[0m         ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
