title: Write 3 positive numbers and sum
body: <p>I;m writing code, this code should prompts the user for 3 positive numbers (or zero) and then adds them together. If the user enters a negative number, the program should reprompt them until they enter a positive number. But it is not working, when I add negative numbers, the code took it as a part of the final result, and it is supposed that just take the positive. Any help or advice will be more than welcome.</p>
  
  <pre><code>def prompt_number(notPositive):
      print("Invalid entry. The number must be positive.")
  
  def compute_sum(a, b, c):
      return a + b + c
  
  def main():
  
      while True:
          num1 = int(input("Enter a positive number: "))
          if num1 &gt;= 0:
              print()
          else:
              print(prompt_number(num1))
  
  
          num2 = int(input("Enter a positive number: "))
          if num2 &gt;= 0:
              print()
          else:
              print(prompt_number(num2))
  
  
          num3 = int(input("Enter a positive number: "))
          if num3 &gt;= 0:
              print()
          else:
              print(prompt_number(num3))
          break
      result = compute_sum(num1, num2, num3)
      print (str(result))
  
  main()
  </code></pre>