Python Introduction Workshop: Difference between revisions

From Hackers & Designers
(Created page with " What to talk about... * Variables * Conditionals * Loops * Functions * Exception handling? * File I/O...reading and writing from files.")
 
No edit summary
Line 2: Line 2:
What to talk about...
What to talk about...


* Variables
* Variables (integers, arrays)
* Conditionals
* Conditionals (if/elif/else)
* Loops
* Loops (for, while)
* Functions
* Functions (def function_name(args):)




* Exception handling?
* Exception handling? (try/catch)
* File I/O...reading and writing from files.
* File I/O...reading and writing from files:
 
f = open('handd-book.wiki', 'w') # write
img_file = open(filename, 'wb') # i think append?
f = open('handd-book.wiki', 'r') # read

Revision as of 11:46, 28 January 2016

What to talk about...

  • Variables (integers, arrays)
  • Conditionals (if/elif/else)
  • Loops (for, while)
  • Functions (def function_name(args):)


  • Exception handling? (try/catch)
  • File I/O...reading and writing from files:

f = open('handd-book.wiki', 'w') # write img_file = open(filename, 'wb') # i think append? f = open('handd-book.wiki', 'r') # read