Discover the best answers at Westonci.ca, where experts share their insights and knowledge with you. Discover a wealth of knowledge from experts across different disciplines on our comprehensive Q&A platform. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

can find error , suppose to print what season it is and if fails : Traceback (most recent call last):

File "main.py", line 4, in

input_month = input()

EOFError: EOF when reading a line

Here's the code .


input_month = input()
input_day = int(input())

input_month = input()
input_day = int(input())

if input_month in ('January', 'February', 'March'):
season = 'winter'

elif input_month in ('April', 'May', 'June'):
season = 'spring'

elif input_month in ('July', 'August', 'September'):
season = 'summer'

else:
season = 'autumn'

if (input_month == 'March') and (input_day > 19):
season = 'spring'
elif (input_month == 'June') and (input_day > 20):
season = 'summer'
elif (input_month == 'September') and (input_day > 21):
season = 'autumn'
elif (input_month == 'December') and (input_day > 20):
season = 'winter'

print("Season is",season)

Sagot :

Answer:

Change:

print("Season is",season)

To:

print("Season is " + season)

Explanation:

String Concatenation can be done using many ways but not by comma. You can use the + operator like i just did or % operator, join method or format function.

But for now, try using the + operator.