Professional Documents
Culture Documents
Eric Shook
Department of Geography
Kent State University
The Python Programming Language
Python is an Open Source programming language
It is easy to use and easy to learn how to program
Python website: https://www.python.org/
Additional links:
Documentation: https://docs.python.org/3/
Tutorial: https://docs.python.org/3/tutorial/index.html
Reference Manual: https://docs.python.org/3/reference/index.html
Many online resources:
Google will help
A Python Statement
Variable
Assignment
Value
Statement
Command-line Terminal
$ nano helloworld.py
$ python helloworld.py
Try it
helloworld.py
Command-line Terminal
$ nano helloworld.py
Nothing? $ python helloworld.py
Print Function Statement Breakdown
print(mystring)
Command-line Terminal
$ nano helloworld.py
PRINT
pRINT
PrInT
http://en.wikipedia.org/wiki/Case_sensitivity
Bugs
$ python helloworld.py
File "helloworld.py", line 4
These are
bugs and errors ^
that you will see SyntaxError: invalid syntax
Common Bugs
Attention to detail is vital when programming, because the
smallest error and cause hard-to-find bugs. Each of the lines
below contain one error. Can you spot them all?
mystring="Hello World!")
print(Hello World")
Print(mystring)
mystring="Hello World!")
print("Hello World")
print(mystring)