-2

I recently started using Python on VScode and I have been having problems with my output.The code runs smoothly(no problems detected) but the result doesnt appear in my output.The problem isnt with my code because even a simple command like print("Hello world") doesnt appear. Can someone help me? Here are some screenshots Also I tried running the program from another terminal but I had to save the file,for exapmple dna.py, and the system wont let me.An error message appears saying it this file is not supported by .ipynb support and the name should match this pattern .ipynd(tried it,still wont accept it)

The code that I created The image in my ouput after I run the code

  • 3
    The print shows up if you run from any terminal but not from the vscode embeded terminal ? – Peterrabbit Mar 21 '22 at 09:58
  • First, you can try whether you can output code on CMD or PowerShell to ensure that it is the setting problem of Python or the problem of vscode. Secondly, in the interface of vscode, do you select the terminal label at the bottom and whether the terminal on the right is displayed correctly? Your description is so brief that I can't be sure what your problem is. Can you provide more detailed information – MingJie-MSFT Mar 22 '22 at 01:40
  • Can you post a screenshot? – John Gordon Mar 22 '22 at 04:41

1 Answers1

0

I suggest reviewing the official Visual Studio Code Python documentation and tutorial.

Also, try to run the file directly in a terminal and see if it solves your problem. ex: python my_script.py

See this answer for more details.

Aaryan
  • 1
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 21 '22 at 13:07