title: How do you use the output of one function, as an inputted value in another?
body: <p>I am doing a coding project for school, where I have the following prompt:</p>
  <p><em>In a target practice exercise, a student holds a rifle 5 meters away from a target. The target is tossed up at 5 meters/second. Write a function that takes in the angle (in degrees) at which the student is holding their rifle and provides the time in seconds after the target is released that the student should shoot. Specify units in your input(). (Assume the speed of the target is constant - ignore gravity). Make sure to include a caller after and a docstring in all of your functions. Use the math module.</em></p>
  <p>I have the following code:</p>
  <pre><code>#Imports the math function
  import math
  
  #Prompts the user to input the angle of which the rifle is pointed in the air
  angle = float(input(&quot;Enter the angle of which the rifle is pointed in the air (In degrees): &quot;))
  
  #Function to determine length of shot
  def length_of_shot():
      #Multiplies the inputted angle (Converted to radians) with the adjancent side (5) to figure out opposite side (Height in the air)
      return math.tan(math.radians(angle)) * 5
  
  #Function to determine time to shoot
  def time_to_shoot(): 
      #Divide by 5 since the target is tossed in the air at 5 meters / second
      return lenth_of_shot / 5
  
  #Calls the time_to_shoot function
  time_to_shoot()
  </code></pre>
  <p>I am trying to figure out how to take the output value from the function &quot;length_of_shot&quot;</p>
  <pre><code>def length_of_shot():
      return math.tan(math.radians(angle)) * 5
  </code></pre>
  <p>And use it in this equation in the function &quot;time_to_shoot&quot;</p>
  <pre><code>def time_to_shoot(): 
      return length_of_shot / 5
  </code></pre>