Create a program that asks the user for a day and then gives them a distance in days between that day and another random day in the year. We have provided you with a possible starter, but you are welcome to change it up if you would like.

from datetime import date
import random
import math

# expected output shown below (or something similar)
day = input("input a day: ")
month = input("input a month: ")
year = input("input a year: ")
print("user date: " + str(month) + "/" + str(day) + "/" + str(year))
userdate = date(int(year), int(month), int(day))
randommonth = random.randint(1,12)

thirtyonedays = [1,3,5,7,8,10,12]

if (randommonth in thirtyonedays):
    randomday = random.randint(1,31)
elif (randommonth == 2):
    randomday = random.randint(1,28)
else:
    randomday = random.randint(1,30)

randomyear = random.randint(1990, 2023)

print("random date: " + str(randommonth) + "/" + str(randomday) + "/" + str(randomyear))
randomdate = date(randomyear, randommonth, randomday)
result = randomdate - userdate
result = abs(result.days)
print("There are " + str(result) + " days between the two dates")
user date: 2/5/2020
random date: 1/27/2004
There are 5853 days between the two dates