subject
Computers and Technology, 06.04.2021 08:20 dej33

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)

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:00, anamatiascamaja
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
image
Computers and Technology, 23.06.2019 12:20, jshhs
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
image
Computers and Technology, 24.06.2019 00:40, dheydar3506
What is the error in the following pseudocode? module main() call raisetopower(2, 1.5) end module module raisetopower(real value, integer power) declare real result set result = value^power display result end module
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, ariyanadavid5989
1. which of these is not true about torsion bars? a. they can be used to adjust ride height b. they can be adjusted anytime since they don't affect alignment angles c. they attach between the frame and the lower control arm d. they twist to produce a spring effect
Answers: 1
You know the right answer?
Can find error , suppose to print what season it is and if fails : Traceback (most recent call last)...

Questions in other subjects: