#๐Ÿ”’ Code not working, (syntax error on line 1) URGENT

47 messages ยท Page 1 of 1 (latest)

vale hatch
#

apparently none of my codes work now because of this error, i don't think it's an error w my code but w the location it's trying to rrun in(? this is due to an hour and can't find a fix

lost tapirBOT
#

@vale hatch

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.

iron sun
#

You are running a PowerShell command ("& C:......") at the Python interactive prompt, which expects Python code.

#

I think you've started an interactive Python and not left it. Try exit() to hopefully get back to a powershell prompt. Then run your & C:..... command.

mental dawn
#

Likely this is the code runner extension injecting the command into the terminal; but the extension doesn't know the python REPL is active.

vale hatch
#

tkankiuu, I tried running it on a designed terminal and you were right

#

program runs as it should now

wide rover
#

Code Runner runs in Output

vale hatch
#

idk how i managed to run it with the pshell

#

i don't really have much experience coding

wide rover
vale hatch
#

oh

#

def did that

mental dawn
vale hatch
#

i was coding on the bus back home

#

shaky

#

thanks yall 4 the interest on helping

#

now I can deliver my homework

wide rover
wide rover
#

these guys

wide rover
vale hatch
#

oh ty

#

what does REPL stands 4?

#

srry

wide rover
#

and as you learn, you'll be able to recognize what python errors look like

#

like the SyntaxError: ...

wide rover
vale hatch
#

thankss

wide rover
#

you put a line of code, it evaluates it, prints a value if applicable, then loops back

#

you can run it by running python or py with no arguments

vale hatch
#

hmm

#

i see

#

thank yall sm

#

ill keep posting my beginer issues in this group, hehe

wide rover
#

that's great, most questions are from beginners ๐Ÿ˜„

vale hatch
#

def makes sense

#

well, i think this thread is solved

wide rover
#

yerp

vale hatch
#

c yall

#

and thanks agn

#

i will close it now

lost tapirBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.

#

๐Ÿ”’ Code not working, (syntax error on line 1) URGENT