Game of chance - input not working - EOFError

Is it just me?
Input(“x”) doesn’t work at all.
I keep getting this error;
EOFError: EOF when reading a line

Right where I should be entering the input.

Same input code does what it should in my mac’s terminal. But it seems a lot easier for me to do in codecademy.

This task seems to require the user to input their choice does it not?
How else is this meant to go?

Any else having this issue?

1 Like

@roopsta111 Welcome to the forums! I have gotten the same error as you before; it is a Codecademy learning environment issue. Therefore, it is nothing to do with your code, but has something to do with Codecademy. There is a way round it, though.
Say you wanted to find the sum of two numbers. Outside of Codecademy, you could do this:

def sum_calculator():
 number1 = input('Number:')
 number2 = input('Number:')
 number1 = int(number1)
 number2 = int(number2) 
 sum = number1 + number2
 return sum

However, in Codecademy, you would be better off doing:

def sum_calculator(number1, number2):
 sum = number1 + number2
 return sum
sum_calculator(3, 2) #Or whatever numbers you want to test

I hope this helps!
Happy coding!