Python if statement
<pre><code>print("this program will calculate the area")

input("[Press any key to start]")

width = int(input("enter width"))
if width &lt; 0:
    print ("please chose a number between 0-1000")
    width = int(input("enter width"))

if width &gt; 1000000:
    print ("please chose a number between 0-1000")
    width = int(input("enter width"))

height = int(input("Enter Height"))

area = width*height

print("The area is:",area)
</code></pre>

<p>Is there a way i can condense the code below for example fit them together so i won't have to write just about the same line of code except the less then and greater then statement twice.</p>

<pre><code>width = int(input("enter width"))
if width &lt; 0:
    print ("please chose a number between 0-1000")
    width = int(input("enter width"))

if width &gt; 1000000:
    print ("please chose a number between 0-1000")
    width = int(input("enter width"))
</code></pre>

<p>I have tried </p>

<pre><code>width = int(input("enter width"))
if width &lt; 0 and &gt; 10000:
    print ("please chose a number between 0-1000")
    width = int(input("enter width"))
</code></pre>

<p>But i get no love.</p>

<p>I also don't want to type </p>

<pre><code>width = int(input("enter width"))
</code></pre>

<p>statement twice if it can be helped.</p>

<p>Thanks
Ben</p>
