This is the code I am trying to run.

x = int(input("Please enter and integer: "))

for n in range(2,x+1):
    for t in range(2, n):
            if n%t ==0:
                print(n,'equals',t,'*', n/t)
        print(n, 'is a prime number')

This is the error code I keep on getting. Worth noting that the code works if x has a predetermined variable.

Traceback (most recent call last):
  File "C:\Users\ausam\anaconda3\lib\site-packages\qtconsole\", line 138, in _dispatch
  File "C:\Users\ausam\anaconda3\lib\site-packages\spyder\plugins\ipythonconsole\widgets\", line 278, in _handle_input_request
    return super(DebuggingWidget, self)._handle_input_request(msg)
  File "C:\Users\ausam\anaconda3\lib\site-packages\qtconsole\", line 512, in _handle_input_request
    self._readline(msg['content']['prompt'], callback=callback, password=msg['content']['password'])
  File "C:\Users\ausam\anaconda3\lib\site-packages\qtconsole\", line 2422, in _readline
    self._show_prompt(prompt, newline=False, separator=False)
TypeError: _show_prompt() got an unexpected keyword argument 'separator'

Any help would be greatly appreciated. Thanks!

🟢 Solution

This bug has been reported on Github and is supposedly fixed. See

Instructions there are to upgrade to 5.3.0.