Input Function Not Working

That’s because I suspect you aren’t running an actual typical Python-based kernel and instead are using JupyterLite, perhaps. (It uses web assembly and a lot of the normal features of Python are not supported in the default manner. It is noted as very experimental. See the ‘Status’ note here.)

However, you included screenshot that doesn’t show enough and don’t describe the system where you are working. Generally, a screenshot doesn’t suffice and if you do include one be sure to include the information on the type of kernel, which should show up in the upper right side.

Try the following for your input line:

a = int(await input("number please:"))

Depending on the version running that may help. There was a time that worked, then didn’t wok, and now seems back to working. Please see here and the post below it for more potential pitfalls. Actually see here for more details in a better post about await input() use.

I’d suggest using a typical, full-Python kernel backed system for testing out when you may have encountered a JupyterLite limitation, by going here and pressing launch binder. Then when the session comes up in your browser, open a new notebook to get a remote notebook running with a full, typical Python-backed kernel on a temporary remote system, and paste in the code you are trying. That way you’ll know the root cause and can look for JupyterLite/Pyodide-compatible work arounds or decide to just use a typical Python-backed kernel for your efforts.