Hello, I am trying to get my input to only allow integers, and once it gets past 10, it displays error, any assistance would be appreciated.
square_ct = input("Enter an integer from 1-5 the number of squares to draw: ")
triangle_ct = input("Enter an integer from 1-5 the number of triangles to draw: ")
while square_count(input) > 10:
print ("Error!")
square_count=input() #the statement reappears
while triangle_count(input) > 10:
print ("Error!")
triangle_count=input() #the statement reappears
My preferred technique is to use a
while Trueloop with a break:Or, on Python 3: