so i decided i wanted to make a christmas that tells you how long until christmas and so on but although the rest of the code works, it runs the day variable every time even when it isn't supposed to. Any suggestions would be helpful!
Python:
Month= input("What month is it? ")
if Month == "December" or "december":
Day = int(input("What day is it? ")
if Day != 25:
Sleeps = (25 - Day)
stuff_in_string = ("It's not christmas yet, only {} sleeps left to go!").format(Sleeps)
print (stuff_in_string)
elif Day == 26:
print ("Christmas is over but 5 days till New year!")
elif Day == 27:
print ("Christmas is over but 4 days till New year!")
elif Day == 28:
print ("Christmas is over but 3 days till New year!")
elif Day == 29:
print ("Christmas is over but 2 days till New year!")
elif Day == 30:
print ("Christmas is over but 1 days till New year!")
elif Day == 31:
print ("Christmas is over but it's New Years Eve!")
else:
print("Merry Christmas Everyone")
print("I hope you have a lovely day!")
elif Month == "January" or "january":
print ("12 months to go!")
elif Month == "February" or "february":
print ("11 months to go!")
elif Month == "March" or "march":
print ("10 months to go!")
elif Month == "April" or "april":
print ("9 months to go!")
elif Month == "May" or "may":
print ("8 months to go!")
elif Month == "June" or "june":
print ("7 months to go!")
elif Month == "July" or "july":
print ("6 months to go!")
elif Month == "August" or "august":
print ("5 months to go!")
elif Month == "September" or "september":
print ("4 months to go!")
elif Month == "October" or "october":
print ("3 months to go!")
else:
print ("2 months to go!")
Last edited: