title: when i put <fh> value above 40 ,it just give output for <otp> then didn't give <fp> [means fp = reg + otp] .just give [fp = fh * fr]
body: <p>i need to get last print output for &lt; fp &gt;. {fp =  reg + otp}.
  if i cut and paste this fp from if and paste  outside then give reg + otp.</p>
  <pre><code>xh = input('enter hours: ')
  xr = input('enter rate:')
  
  fh = float(xh)
  fr = float(xr)
  
  if fh &gt; 40:
      print(&quot;overtime&quot;)
      reg = fr * fh
      otp = (fh - 40) * (fr * 0.5)
      print(otp)
      fp = reg + otp
  
  else:
      print(&quot;reguler&quot;)
  fp = fh * fr
  
  print('this is your paymant: ',fp)
  
  # it didn't give output for fp = reg + otp
  </code></pre>