Python Forum

Full Version: Getting Started
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys,

So i'm a complete noob when it comes to programming but i wanted to get started with Python. I've installed python 2.7.15 and when i type python -V it does say that it is installed. Now have i started with the helloworld project and i want to run it. It gives a syntaxerror: invalid syntax. I am in the same directory where i saved the project. I use the folliwing command in cmd: python helloworld.py . It points a small arrow towards the 7 in 2.7.15. What does this mean can anyone help me out?

Greetings
First of all - you should be using python3 (latest version 3.6.5). Python2 support will end soon, so don't start learning it.

Check this tutorial and see if it helps to understand different ways to run code
https://python-forum.io/Thread-Basic-How...ython-code
I get the same error with python 3 installed.
I didn't say it's an error due to python version. It's due to the incorrect way you run the code. Did you check the tutorial from the link I posted.
(May-23-2018, 11:11 AM)wargasme Wrote: [ -> ]It points a small arrow towards the 7 in 2.7.15. What does this mean can anyone help me out?
What's your code? 2.7.15 isn't valid python, but it's the .15 that should throw an error, not the 7.
And what is the complete text of the error you are getting?