Comparing numbers give the wrong result in Python
<p>sorry if this is a terrible question, but I am really new to programming. I am attempting a short little test program.</p>

<p>If I enter any value less than 24, it does print the "You will be old..." statement. If I enter any value greater than 24 (ONLY up to 99), it prints the "you are old" statement.</p>

<p>The problem is if you enter a value of 100 or greater, it prints the "You will be old before you know it." statement.</p>

<pre><code>print ('What is your name?')
myName = input ()
print ('Hello, ' + myName)
print ('How old are you?, ' + myName)
myAge = input ()
if myAge &gt; ('24'):
     print('You are old, ' + myName)
else:
     print('You will be old before you know it.')
</code></pre>

<p>Use <code>int(myAge)</code>. I always use <code>raw_input</code> and also, you dont have to print your questions. Instead put the question in with your raw_inputs like so:</p>

<pre><code>myName = raw_input("Whats your name?")
print ('Hello, ' + myName)
myAge = raw_input('How old are you?, ' + myName)
if int(myAge) &gt; ('24'):
    print('You are old, ' + myName)
else:
    print('You will be old before you know it.')
</code></pre>

python if-statement