+ 1
If i can put >>> before write print, then error msg shows that is invalid text, why?
I wrote >>> print ("Hi, I am Ana Maheshwari")
5 Antworten
+ 2
You can execute python in 2 ways: Shell mode, and interpreted mode... With shell mode, python run and wait for you direct input and use '>>>' symbol to notify you that you can insert input... Interpreted mode its execute without your input (but you have to tell to python which script you want execute)... How different are they for run? Shell mode happen when you call python without provide it a script to execute, else you run python in interpreter mode... Turn at you problem, how you run python? You write that text in a .py script and pass it to python?
+ 2
Because often examples go with practical writing and for very simple codes, shell mode its more immediate. In interpreted you have to create a .py file, write you script on it, save and run python with script path like argument but in shell mode you have to run python and write you statements
+ 1
You are using an IDE, not a terminal, and even if you were using a terminal, most IDEs nowadays have terminals that don't actually require those ">>>"
0
Okay if it is not necessary for using. Actually i m just beginner & still i m not clear with your responses cause in starting examples i saw that >>> used in all questions so i used.
0
that only works when using interactive mode(the IDE provides it), but in your own programs using a text editor u will omit >>>, if not u will get an error