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

imported>Mako
imported>Mako
Line 19:
#** assignment of variaibles
#** e.g., math with variables: scale up a recipe, into an assignment
#** you can assign to a variable and it will replace the old value
#* strings
#** things within quotation marks
Line 26 ⟶ 27:
#** 1 is different than "1"; name is different than "name"
#** single quotes versus double quotes (python doesn't care)
#** you can also multiply strings! (although it's not clear why you want to weird)
#* booleans
#* <tt>if</tt>/<tt>elif</tt>/<tt>else</tt>
#* functions
#** has a parentheses
#** exit(), help(), type()
#** we've already learnd examples of this: exit(), help(), type()
# lists
#* purpose
Line 39 ⟶ 42:
#* slicing lists
#* strings are like lists
#** len()
# loops and more flow control
#* <tt>for</tt> loops
Anonymous user