Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fill in the missing parts of the program below to solve the problem as stated above. Do not add any additional lines of code. Only

Fill in the missing parts of the program below to solve the problem as stated above. Do not add any additional lines of code. Only missing code please. :)
# MagicDate.py
# Get month
month = int(input('Enter the month in numeric form: '))
# Get day
day =________________________________ #1
# Get year
year = int(input('Enter the year in two digit format: '))
# Check if month input is valid
if __________________________________ #2
print('Error: invalid month input')
# Check if day input is valid
elif day >31 or day <1:
________________________ #3
# Check if year input is valid
elif year >99 or year <0:
print('Error: invalid year input')
# Input is valid
else:
# Display magic date evaluation
print('The date is ', month, '/', day, '/', year)
if _______________________ #4
print ('This is a magic date.')
else:
___________________________ #5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions