#Authore:  James Tam
#Version:  2020
#Learning: illustrating how recursion can be used in place of a repetitive
#error handling loop.
MIN = 1
MAX = 31
def promptDay():
    day = int(input("Enter day of birth (%d-%d): " %(MIN,MAX)))
    if ((day < MIN) or (day > MAX)):
        day = promptDay()
    return(day)

day = promptDay()
print(day)
