When I call the main() function my outputs have brackets around them, while I need them not to have brackets. I also need the integer and the letters following to connect e.g. 1st, 2nd, 2021st, 15th. Thanks!
def int2ordinal(int):
if int % 10 == 3:
return (int), 'rd'
elif int % 10 == 2:
return (int), 'nd'
elif int % 10 == 1:
return (int), 'st'
else:
return (int), 'th'
def main():
day = int(input("Enter a day between 1 and 31: "))
month = int(input("Enter a month between 1 and 12: "))
year = int(input("Enter a year between 1 and 2100: "))
print("On the", int2ordinal(day), "day of the", int2ordinal(month), \
"month of the", int2ordinal(year), "year, something amazing
happened!")
main()