#4.Write a program to check if a date is valid or not in python.
import datetime
inputDate = input("Enter the date in format 'dd/mm/yy' : ")
day,month,year = inputDate.split('/')
isValidDate = True
try : datetime.datetime(int(year),int(month),int(day))
except ValueError : isValidDate = False
if(isValidDate) : print ("Input date is valid ..")
else : print ("Input date is not valid..")

7bce6475b2c058422b4eca77af31d6db2f357fc8
<mask token>

<mask token>
try:
    datetime.datetime(int(year), int(month), int(day))
except ValueError:
    isValidDate = False
if isValidDate:
    print('Input date is valid ..')
else:
    print('Input date is not valid..')

<mask token>
inputDate = input("Enter the date in format 'dd/mm/yy' : ")
day, month, year = inputDate.split('/')
isValidDate = True
try:
    datetime.datetime(int(year), int(month), int(day))
except ValueError:
    isValidDate = False
if isValidDate:
    print('Input date is valid ..')
else:
    print('Input date is not valid..')

import datetime
inputDate = input("Enter the date in format 'dd/mm/yy' : ")
day, month, year = inputDate.split('/')
isValidDate = True
try:
    datetime.datetime(int(year), int(month), int(day))
except ValueError:
    isValidDate = False
if isValidDate:
    print('Input date is valid ..')
else:
    print('Input date is not valid..')

#4.Write a program to check if a date is valid or not in python.
import datetime
inputDate = input("Enter the date in format 'dd/mm/yy' : ")
day,month,year = inputDate.split('/')
isValidDate = True
try : datetime.datetime(int(year),int(month),int(day))
except ValueError : isValidDate = False
if(isValidDate) : print ("Input date is valid ..")
else : print ("Input date is not valid..")
