Как использовать int(input()) в ядре JupyterLite/PyodidePython

Программы на Python
Гость
Как использовать int(input()) в ядре JupyterLite/Pyodide

Сообщение Гость »


Я попробовал запустить приведенный ниже код в Jupyter, обслуживаемом онлайн:

Код: Выделить всё

term_no = input('Enter number of approximations to use: ')
term_no = int(term_no)
print(term_no)
and it returns an error

Код: Выделить всё

TypeError: int() argument must be a string, a bytes-like object or a real number, not 'PyodideFuture'
There's no error when I run this in VS code. Is there a bug with Jupyter or should I add something extra?


Источник: https://stackoverflow.com/questions/773 ... ide-kernel

Вернуться в «Python»