num = int(input("Enter a number: "))
if num==0 or num<0:
continue
else:
if num > 1:
if (num % i) == 0:
print(num,"is not a prime number")
print(i,"times",num//i,"is",num)
break
else:
print(num,"is a prime number")

# show prime numbers
# prime numbers are only divisible by unity and themselves
# (1 is not considered a prime number)
for n in range(2, 100):
for x in range(2, n):
if n % x == 0:
# found a factor
#print(n, 'equals', x, '*', n/x) # optional
break
else:
# note this else has to line up with second for, not the if
# means loop fell through without finding a factor
print(n, 'is a prime number')

I have the following problem.
when i pres buttun printpreview (button 5) the the print preview fires up.
and when i close the print preview without printing and minimize the ...