title: How to call a function inside a function in Python
body: <pre><code>def diserang(self, lawan, attackPower_lawan):
      print(self.name + &quot; Diserang &quot; + lawan.name)
      attack_diterima = attackPower_lawan / self.armorNumber
      print(&quot;Serangan terasa :&quot;, str(attack_diterima))
      self.health -= attack_diterima
      print(&quot;Darah &quot; + self.name + &quot; tersisa &quot; + str(self.health))
      
  
  # TODO make hero attack and armor status up by 30% if the health reach by 50%
  def statusUp(self, attUp, armUp):
      if self.health &lt;= 50 :
          attUp += 30
          armUp += 30 
      else:
          raise Exception(&quot;Darah Anda Masih Normal&quot;)
  </code></pre>
  <p>i want to call the &quot;statusUp&quot; inside the &quot;diserang&quot;, can anyone help me and explain it to me? im new at programming, thanks!</p>