Community Data Science Workshops (Fall 2014)/Day 1 lecture: Difference between revisions

Content added Content deleted
imported>Mako
imported>Mako
Line 38: Line 38:
* <tt>if</tt>/<tt>elif</tt>/<tt>else</tt>
* <tt>if</tt>/<tt>elif</tt>/<tt>else</tt>
** if, something that evaluates to a boolean, and then colon
** if, something that evaluates to a boolean, and then colon
** e.g., if "mako" in "makoshark"
** e.g., <code>if "mako" in "makoshark"</code>
** e.g., if mako_age > atom_age
** e.g., adding else example: </code>if mako_age > atom_age</code>
** indent with spaces (we use 4 spaces!)
** indent with spaces (we use 4 spaces!)
* functions
* functions