Westonci.ca is the Q&A platform that connects you with experts who provide accurate and detailed answers. Discover reliable solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.

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.

We hope our answers were helpful. Return anytime for more information and answers to any other questions you may have. We appreciate your time. Please revisit us for more reliable answers to any questions you may have. Get the answers you need at Westonci.ca. Stay informed with our latest expert advice.