In the above Python code the exact output was coming but after output they were showing some error
def main(): i=1 while i < 3: inputString = input() inputStringTwo = input() inputStringThree = input() outputString=inputString[0] + inputStringTwo[0] + inputStringThree[0] print(outputString) i+=1 main()
Here we are giving input as
Very Important Person
The Error was
VIP Traceback (most recent call last): File "main.py", line 15, in <module> main() File "main.py", line 5, in main inputString = input() EOFError: EOF when reading a line
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