Learn Programming the PlanGrid Way 1 documentation

Day 2: Guido, PEP8, If statements, Loops

«  Day 1: Editors, Logic, Types, Variables   ::   Contents   ::   DRY: Do not repeat yourself  »

Day 2: Guido, PEP8, If statements, Loops

“Code is read much more often than it is written” ~ Guido Von Rossum

Outline

  • History: Guido, the BDFL
  • Comments - howto and style
  • Printing and %s notation - %s, %d, %.2f - old vs new notation - https://docs.python.org/2/library/string.html#formatstrings
  • Printing n, r, t
  • If, elif, else
  • input
  • for, while, break, continue
  • pep8, flaking, linting - Oh my!

Homework

  • LPTHW chapters 5,7,8,10
  • Read from Zelle: 2.5 - 2.7, exercises 5-10
  • Dive into python: Formatting strings
  • Hook up Sublime (or whatever) with pyflakes, pylint
  • Ask eleddy for access to a file. Make comments on style (pep8) in github. Open an issue, and assign the fixes to a fellow classmate. Next week we learn about version control and how to fix them.

References

«  Day 1: Editors, Logic, Types, Variables   ::   Contents   ::   DRY: Do not repeat yourself  »