title: How can I pass parameters from different functions and add subtract etc to them?
body: <p>In detail I have x as a parameter for random number selected in a function.</p>
  
  <pre><code>def Range(x):
      Range.b = random.randint(1,x)
  </code></pre>
  
  <p>Now I want to take x and pass it a shop function I have . And if they Purchase a power up I want to take the parameter of x and do </p>
  
  <pre><code>x//3
  </code></pre>
  
  <p>Then take the original number of x subtract the x divided by three and print it. I have no idea what to do. I’ve already searched the internet nothing useful comes up or I they are to complicated for me to understand. Any help will be greatly appreciated.</p>
  
  <pre><code>def Range(x):
      Range.b = random.randint(1,x)       
  def givenrange(y):
      print('the range is 1-',y)
  def shop(points):
      time.sleep(3)
      a=input('welcome to the shop, go ahead and type yes to acesses the power ups. Type no or something else to exit\n\n')
      if a == 'yes':
          s=input('Rule of Thirds: Take out a third of the numbers giving you a more precise range: Price=500 y/n')
          if s == 'y':
              points -= 500
              print('Purchase complete: you have', points,'points')   
  shop(points)
  </code></pre>
  
  <p>I use Range.b and such because I access the variables outside the function.</p>