Answered step by step
Verified Expert Solution
Question
1 Approved Answer
pseudocode for the following # Function: This program determines if a date entered by the user is valid. # Input: Interactive # Output: Valid date
pseudocode for the following
# Function: This program determines if a date entered by the user is valid.
# Input: Interactive
# Output: Valid date is printed or user is alerted that an invalid date was entered.
validDate True
MINYEAR
MINMONTH
MAXMONTH
MINDAY
MAXDAY
# Get the year, then the month, then the day
year intinputEnter the year:
month intinputEnter the month :
day intinputEnter the day :
# Check to be sure date is valid
if year MINYEAR: # invalid year
validDate False
elif month MINMONTH or month MAXMONTH: # invalid month
validDate False
elif day MINDAY or day MAXDAY: # invalid day
validDate False
# Test to see if date is valid and output date and whether it is valid or not
if validDate:
printfmonthdayyear is a valid date."
else:
printfmonthdayyear is an invalid date."
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started