Python Concepts/To Get You Started

Objective

edit
  • Learn about comments.
  • Review the shell and its prompt.
  • Learn what a variable is and what it does.
  • Review about Python 3.X and Python 2.X
  • Review about a Python script.
  • Learn some Python jargon.

Lesson

edit

This quick lesson will help you understand the basics of Python, while helping to explain some jargon that you'll hear later on.

The Basics

edit
  • First off, a comment is a number sign, #, (also called a hashtag in social media) followed by some text. A comment is a human readable sentence that Python will ignore. For example, # This is a comment! will not be interpreted by Python.
  • Second, if you ever see three greater than signs (>>>) and three periods (...), then this implies that the Python shell is being used. Refer back to the previous lesson on how to access the shell.
  • Thirdly, a variable is a namespace , like var and somevar, and it can hold a Python data type, like a number or string that you'll learn about later.
  • Fourth, like the previous lesson stated, Python 3.X will be used in this course, so make sure you don't use Python 2.X or you'll definitely get an error message.
  • Fifth, a python script is just a plain text file with python code in it. Refer back to the previous lesson for more information.

Python Jargon

edit
  • CPython: The original Python implementation written in C.
  • IDE: Stands for Integrated Development Environment. An IDE named IDLE is bundled with a CPython installation.
  • Namespace: The name of a variable.
  • PEP: Stands for Python Enhancement Proposals. These documents rationally govern Python.
  • PSF: Stands for Python Software Foundation. This non-profit organization helps maintain and advance Python.
  • Pythonic: Something that follows the idioms of Python.
  • Shell: A simple GUI that can print output and capture input.
  • Unpythonic: Opposite of Pythonic. Something that doesn't follow or goes against the idioms of Python.
  • Zen of Python: Formally known as PEP 20. A document that closely expresses Python's principles and philosophies.

Assignments

edit
  • Make sure you understand this lesson, as it will be assumed that you know this.
  • Make sure you can open up Python from a shell or prompt.
  • Double check to make sure that you have Python 3.X and if you don't, see Introduction and setup.
  • Make sure you know how to create and run a Python script.
  • Make sure you understand the Python vocabulary and jargon. If you're interested in learning more, see the Python Documentation Glossary.

Completion status: Ready for testing by learners and teachers. Please begin!