I have a use a try
/except
block to prompt the user for an input. My problem is that it always prints "Perfect" no matter what the number of number_disks
. What is the problem with my code?
number_disks = -2
try:
number_disks > 0 and number_disks <= 8
print("Perfect")
except:
print("the number of disks is between 1 and 8, try again!")
number_disks = input(int("what is the number of disks?\n"))