I am using the Python Language. Each time I press f5 to run the program, it displays "EOFError: EOF when reading a line" in the debug console and points an error to the first line. When I try to run the same program in Python IDLE (3.8 64-bit), it runs perfectly. When I delete the first line of code (since the error is there), the error is the same but now on the new first line. When there is a genuine error, such as syntax, the debug console points that error out for me. But when I fix it, the same EOF error continues.
year = int(input ("Enter a year: "))
if ((year % 100) == 0 and (year % 400) == 0) or ((year % 100) != 0 and (year % 4) == 0):
print('In', year, 'February has 29 days.')
else:
print('In', year, 'February has 28 days.')
Here is a screenshot of the code and error message: https://i.stack.imgur.com/9GKiD.png
I fixed it by changing the
launch.json
settings to: