In the above Python code the exact output was coming but after output they were showing some error
JavaScript
x
13
13
1
def main():
2
i=1
3
while i < 3:
4
5
inputString = input()
6
inputStringTwo = input()
7
inputStringThree = input()
8
outputString=inputString[0] + inputStringTwo[0] + inputStringThree[0]
9
print(outputString)
10
i+=1
11
12
main()
13
Here we are giving input as
JavaScript
1
4
1
Very
2
Important
3
Person
4
The Error was
JavaScript
1
9
1
VIP
2
3
Traceback (most recent call last):
4
File "main.py", line 15, in <module>
5
main()
6
File "main.py", line 5, in main
7
inputString = input()
8
EOFError: EOF when reading a line
9
Here VIP is the output
For Question and test cases please refer below link https://drive.google.com/file/d/1cXmIW56uurB83V4FNRuNw9VhJ7RcYU9j/view?usp=sharing
Advertisement
Answer
if you are using an online IDE;
EOFError is raised when one of the built-in functions input() or raw_input() hits an end-of-file condition (EOF) without reading any data. This error is sometimes experienced while using online IDEs. (https://www.geeksforgeeks.org/handling-eoferror-exception-in-python/)
try not to use online IDEs its better to download python