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

no edit summary
imported>Mako
imported>Mako
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1:
{{CDSW Moved}}
 
Welcome to the Saturday lecture section of the Community Data Science Workshop! For about 2 hours, we'll work through an introduction to the Python programming language via both a lecture and hand-on exercises.
 
At the beginning of the lecture, we'll give a [[Day 1 pre-lecture|short pre-lecture talk to motivate the sessions]].
 
== Resources ==
Line 89 ⟶ 93:
** Super powerful because it can do something many many times. Data science is about doing tedious things very quickly. For is the workhorse that makes this possible.
** Look and see name is after we're done looping.
** ''Move to editor.'''
* <tt>if</tt> statements inside <tt>for</tt> loops
** e.g., <code>if name[0] in "AEIOU"</code> then print "starts with a vowel"
** show we can test things outside the loop to show how the comparisons are working
** add an else statement to capture words that start with a consonant
** append to a list within a for loop
** create a counter within a for loop (keep track)
** build up a sentence
* nested <tt>for</tt> loops
* <tt>range()</tt>
Anonymous user