title: Variable X not updating when variables that should effect X change
body: <p>I am a beginner at python. As most beginners, I am trying to make a text based rpg. I have finally gotten to the leveling up system and am at another roadblock. When the character levels up, they get to allot x skill points to a skill (add x to a variable x times). two of these variables effect the health of the character, however, when these two variables are changed by the user, the health variable stays the same. I have simplified my code for ease of reading (as my prose above is not that clear to begin with lol):</p>
  
  <pre><code>class Char:
  
      def __init__(self, x, y):
          self.str = x
          self.con = y
          self.hp = (self.con + self.str) / 2
  
  
  player = Char(20, 20)
  
  
  def main(dude):
      print("strength:     " + str(dude.str))
      print("constitution: " + str(dude.con))
      print("hp: " + str(dude.hp))
      print("------")
      action = input("press 1 to change str, 2 to change con")
      if action == "1":
          dude.str = dude.str + 10
          main(dude)
      elif action == "2":
          dude.con = dude.con + 10
          main(dude)
      else:
          main(dude)
  
  
  main(player)
  </code></pre>
  
  <p>although these variables can increase by increments of ten in this situation, the hp remains at 20</p>
  
  <p>how can I remedy this problem?</p>
  
  <p>Thanks!</p>