Sum two numbers
<p>When I type the input of the sum of number1 + number2 as "answer" and number1, number2 are two randomized numbers between 1-500, I get my "Wrong, sorry!" statement instead of the "Right!" when the answer is correct.</p>

<p>For example, if the two numbers are 479 + 121, the answer should be 600, right? Well, apparently it's not, my code likes to say. Due to some error logic, I'll guess. (Note this is just an excerpt, obviously. The variables were declared as integers before in the main module and random is imported.) </p>

<pre><code>  def getNumbers():
     number1 = random.randint(1, 500)
     number2 = random.randint(1, 500)
     return number1, number2

  def getAnswer(number1, number2, answer):
     print("What is the answer to the following equation:")
     print(number1)
     print("+")
     print(number2)
     answer = input("What is the sum? ")
     return answer

 def checkAnswer(number1, number2, answer, right):
     if answer == number1 + number2:
       print("Right!")
     else:
       print("Wrong, sorry!")
</code></pre>

<p>It comes out as:</p>

<p>What is the answer to the following equation?</p>

<p>479</p>

<p>+</p>

<p>121</p>

<p>What is the sum? 600</p>

<p>Wrong, sorry!</p>

<p>0 also comes in as incorrect, so I'm not sure what the value is being set to. Any idea how to fix this code?</p>