Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Started
#1
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
Reply
#2
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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
I get the same error with python 3 installed.
Reply
#4
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.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
(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.
Reply
#6
And what is the complete text of the error you are getting?
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot get started standenman 4 1,199 Feb-22-2023, 05:25 PM
Last Post: standenman
  Need help i just started the whole thing gabriel789 16 3,178 Sep-12-2022, 08:04 PM
Last Post: snippsat
  Can't even get started dr6 1 1,613 Aug-18-2020, 04:38 PM
Last Post: Larz60+
  Getting started mba_110 0 1,723 Jan-18-2019, 05:23 PM
Last Post: mba_110
  Just getting started alwillia 6 3,562 May-20-2018, 07:22 PM
Last Post: ljmetzger

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020