PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Error1(Exception):
pass
class ValueTooSmallError1(Error1):
pass
number = 10
while True:
try:
i_num = int(input("Enter a number: "))
if i_num < number:
raise ValueTooSmallError1
break
except ValueTooSmallError1:
print("This value is too small, try again!")
print()
print("Congratulations! You guessed it correctly.")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run