Getting Started with Python

Python is called a "scripting" language, meaning that you write the code in a plain-text document and run it with an interpreter. This way, any changes you make to the script are simply reinterpreted every time you run the program.

example.py script file

print("Python Works!")

The print("Python Works!") will print "Python Works" to the screen. The screen in this case is on what is known as the console.

  • Try running this:

    python3 example.py
    

Given the code above, you should see Python Works! printed to the screen. The command python3 is the Python interpreter for version 3. The most current version of Python is 3.7, with 3.8 in development.

Case Sensitivity

Python is case sensitive. This means that capitalization makes a difference in most circumstances.

For example:

print("Python")

is not the same as:

PRINT("Python")

In fact, the second piece of code produces the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'PRINT' is not defined

Stephen Marz (2019)