Python Tutorials

Last summer I wrote a small set of four tutorials in Python for the Pre-College robotics program. I figured I mine as well put them up here.

They should work with both Python 2.7.2 and whatever the latest version of Python 3 is. Download Python, start IDLE (the Python editor/interpreter that comes with it) and go to File->New Window. Paste any of the code into there, and it will appropriately highlight everything. In order to run them, in the window where you pasted the code, go to Run->Run Module or press F5. That will show the actual values of the programs.

  1. Basics [Pastebin]
  2. Conditionals [Pastebin]
  3. Loops [Pastebin]
  4. Functions [Pastebin]
Tagged ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>