Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Terminal not accepting inputs in visual code

Iam new to python. So my code was working just fine, until I opened the same program a few hours later. The language being used is Python, in Visual code. This is a screenshot of the output terminal.

The program prompts the user to either press ‘M’ or ‘D’at the very beginning. However, when I do so, it dosen’t register. Not only ‘M’ or ‘D’, but any charater entered isn’t accepted. I have code runner extension istalled. As mentioned above, the input was being accepted a few hours prior to this. I installed visual code today itself, so it is the latest version. Please help.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Seems more like an issue/bug in Visual code. Try to run the program externally by going to the folder, opening a console window and running it by entering python hello_world.py, then you see where the issue comes from.

Edit: I don’t use Visual Code personally, but this sounds similar to your problem: How to allow VS Code to take input from users?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading