Birth Year Leap Check Assignment Answers Needed
Your Question:
[Birth Leap Year] Question 1
05 points
Enter your birth day: [USER INPUT]
Hello, the DOB you entered is MONTH-DAY-YEAR and you are NOT/BORN in a leap year.
Please enter the month: 9
Please enter the day: 1
Step By Step Answers with Explanation
birth_year = int(input("Enter your birth year: "))
birth_month = int(input("Enter your birth month: "))
return True
else:
# Step 4: Print the result
print(f"Hello, the DOB you entered is {formatted_date} and you are {leap_year_message}.")
4. We determine whether the entered birth year is a leap year using the `is_leap_year()` function and store the appropriate message in the `leap_year_message` variable.
5. Finally, we print the formatted message that includes the date and whether the user was born in a leap year or not.