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>The string <code>'100'</code> is indeed less than the string <code>'24'</code>, because <code>'1'</code> is "alphabetically" smaller than <code>'2'</code>. You need to compare <em>numbers</em>.</p>

<pre><code>my_age = int(input())
if my_age &gt; 24:
</code></pre>

python if-statement