Inserting a stop statement
<p>How can I get this program to stop at when the number <strong>13</strong> is entered?</p>

<pre><code>print "\t:-- Enter a Multiplication --: \n"
x = ("Enter the first number: ")                                    
y = ("Enter your second number to multiply by: ")

for total in range(1, 12):
        x = input("Enter a number: ")
        y = input("Multiplied by this: ")
        print "\n  TOTAL: "
        print x, "X", y, "=", (x * y)


#Exits the program.
raw_input("\t\tPress Enter to Exit")
</code></pre>

<p>You used a <strong>for</strong> loop; this is appropriate when you know <em>before you enter the loop</em> how many times you want to execute it.  This is not the problem you have.  Instead, use a <strong>while</strong> loop; this keeps going until a particular condition occurs.</p>

<p>Try something like this:</p>

<pre><code># Get the first input:
x = input("Enter a number (13 to quit): ")
# Check NOW to see whether we have to quit
while x &lt;= 12:
    # As long as the first number is acceptable,
    #   get the second and print the product.
    y = input("Multiplied by this: ")
    print "\n  TOTAL: \n", x, "X", y, "=", (x * y)

    # Get another 'x' value before going back to the top.
    x = input("Enter a number (13 to quit): ")

# -- Here, you're done with doing products.
# -- Continue as you wish, such as printing a "times table".
</code></pre>

python