#๐Ÿ”’ Complete beginner who got stuck on running code on VS code

55 messages ยท Page 1 of 1 (latest)

finite hollyBOT
#

@worn minnow

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

crude hemlock
#

the command is python, not py

#

python HelloWorld.py

fervent viper
#

you havent saved your file

crude hemlock
#

that too

fervent viper
#

first save it and run the same command again

fervent viper
crude hemlock
#

weird, i havent had py work

light spindle
fervent viper
#

sometimes it does

#

mostly because you may have downloaded the microsoft version

light spindle
light spindle
crude hemlock
#

theres the one on the site and the microsoft store version

fervent viper
#

and you should not use that

#

always use the one from python.org website with your respective system

light spindle
#

Yep Python and Py both works

#

@worn minnow you've the python extension of VS code?

fervent viper
#

yeah but its recommended to use the py for windows and python for the other, if you try creating a venv using the wrong command it can break

light spindle
worn minnow
fervent viper
#

press ctrl + s

worn minnow
#

yea alr

fervent viper
#

did you run the file

worn minnow
fervent viper
#

what happens after

worn minnow
fervent viper
worn minnow
fervent viper
fervent viper
# worn minnow

im pretty sure the extension you're using is called code runner

#

uninstall that extension and download the python extension from microsoft

worn minnow
fervent viper
#

np

#

does it work?

worn minnow
#

is this the right one

fervent viper
#

yes

#

you can press the play button on the top right

#

it might ask for the path of your installed python.exe

#

navigate to wherever youve installed python in your system and select the interpretor

worn minnow
#

well thats the one ive been trying, but didnt work.

fervent viper
#

what doesnt exactly work

worn minnow
fervent viper
#

try again

#

it didnt work before cuz you hadnt saved your file

worn minnow
#

i have done all the things u said but it diddnt work, the "+'Please enter your first nummer' appears in the Output session but nothing appears in the Terminal session. here is the result after i press run code

trail crescent
#

dont really get why ppl use python over py lol

crude hemlock
finite hollyBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.