Syntax error issue

i wrote this basic line of code

name = “nithin”
print(name)

and when i try to run the code by hitting the run button, its showing

& C:/Users/Nithin/AppData/Local/Programs/Python/Python38/python.exe “c:/Users/Nithin/Documents/Python cls/PRACTICE SESSION/practice.py”
File “”, line 1
& C:/Users/Nithin/AppData/Local/Programs/Python/Python38/python.exe “c:/Users/Nithin/Documents/Python cls/PRACTICE SESSION/practice.py”
^
SyntaxError: invalid syntax

and when i try to run the code by shift + enter it runs and shows

name = “nithin”
print(name)
nithin

why it is like that…?

@nithinsnty1998

Can you please show me the error screenshot of the IDE with your code and errored output.

2 Likes

This was the error showing last time. But when i tried now its sorted. Could you please tell me why was such error showing last time?

@nithinsnty1998

The screenshot which you posted previously it was having syntax error but it is not in your code that error is because of your location of the code where you are storing the code file.