Python Forum

Full Version: Cant Run Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
my question here: I tried running this code in Python 2.7 (pressing F5) it shows syntax error help!

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print raw_input("USERNAME: ")
USERNAME: username
username
>>> print raw_input("PASSWORD: ")
PASSWORD: password
password
>>> print 1234
1234
>>> print raw_input("Enter The Captcha (number on screen): ")
Enter The Captcha (number on screen): 1234
1234
>>> print raw_input("Login?")
Login?Yes
Yes
>>> print ("Login Success!")
Login Success!
>>> print (" You have two 15 new Mails!")
 You have two 15 new Mails!
>>> 
https://python-forum.io/Thread-Basic-How...ython-code

Read our tutorial how to execute python code. It looks like you try to re-run code written in the interactive prompt.
Quote:I tried running this code in Python 2.7 (pressing F5) it shows syntax error help!
You can not have >>> in script,it's used when in interactive shell.
So if run code as script,i need to not use >>>.

[Image: Wn7asS.jpg]

As a new user you should use Python 3.6 and pip installation under Windows
Find a editor better than IDLE.
PyCharm free Community edition , Thonny.
REPL IPython  or ptpython and look at part-2.