Unable to take input in jupyter notebook

this is the code
x=input()
when i execute it ask for input
but when i press key,
code get converted to markdown with #

jupyter notebook 7.1.3
with python 3.12 , numpy , pandas

Cell not executed due to pending input

The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again.

This question was answered in issue in jupyter · Issue #16320 · jupyterlab/jupyterlab · GitHub

Hey, I had the same issue.
Install Jupyter lab and it works I don’t know why there’s an error with Jupyter notebook though.
To install Jupyter lab run the code
pip install jupyter lab
in your CMD(command prompt)