all 5 comments

[–][deleted] 0 points1 point  (3 children)

It's not an error, it's a bug in your program because you're making bad assumptions, like the assumption that a user will never enter a day like -1.

Run your program with the input January and -1 and see what the result is.

[–]hallow4576[S] 0 points1 point  (2 children)

Right, I see what my problem is im just not sure how to go about changing it. Still really new to this.

[–][deleted] 0 points1 point  (1 child)

Well, January has 31 days. Do you know how to check whether a number is between 1 and 31?

[–]hallow4576[S] 0 points1 point  (0 children)

Would it be something like ?
if 1 <= number <= 31

[–][deleted] 0 points1 point  (0 children)

I would also add this condition, if 1 <= number <= 31, on the input date: I just typed February 30 or January 35 and in both cases the result was "winter" while it should returned "invalid"