How to start programming with Python, start with the basics! (Part 2)
In my previous tutorial I showed you how to install Python on your platform of choice.
Today I will be teaching you the basics of Python programming.
1. Open up a preferred IDE (Integrated Development Environment) or a text editor of your choice.
2. Save your program before we even code it
The program should be saved as "myprogram.py" (substitute "myprogram" for whatever name you choose)
3. Let's test that python even works
Type this into your text editor:
print("Hello World"!)
After you write that go into your console and navigate to the folder in which your code is stored.
Then type this command "python myprogram.py" (my program = the name of your program)
This will run your program
Do you notice any errors while executing the command? If so, see if you can fix it yourself.
If you can't fix it yourself the solution is below
On Line 1 there is a syntax error, "print("Hello World"!)" has the exclamation in the wrong place. Change it around so it is like this "print("Hello World!")", ignore the quotations around the code.