#setBirthday sets their Birthday to a date
def setBirthday(self):
while True:
try:
day = int(raw_input('Please enter the date of the month (1-31) you were born on here ->'))
if day <= 0 or day >= 32:
print "better try again..."
except ValueError:
continue
else:
break
month = int(raw_input('Please enter the month of the year (1-12) you were born on here ->'))
if month <= 0 or day >= 13:
print "better try again..."
except ValueError:
continue
else:
break
year = …
Run Code Online (Sandbox Code Playgroud)