CAT_HUMAN_RATIO = 7 MIN_AGE = 0 MAX_AGE = 114 repeatAnswer = 'y' print("This program determines your age in cat years") print() while (repeatAnswer == 'Y') or (repeatAnswer == 'y'): humanAge = -1 while (humanAge < MIN_AGE) or (humanAge > MAX_AGE): humanAge = int(input("Enter your age (%d - %d years): " %(MIN_AGE, MAX_AGE))) if (humanAge < MIN_AGE) or (humanAge > MAX_AGE): print("Age must be in the range of (%d - %d years):" %(MIN_AGE, MAX_AGE)) catAge = humanAge / CAT_HUMAN_RATIO print("%d in human years is %.1f in cat years" %(humanAge, catAge)) repeatAnswer = input("Make another calculation (y/n): ") print() print("Thank you, come again!")