Difference between revisions of "CSC111 Class Page 2015"
(→ ) |
|||
(137 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
<br /> | <br /> | ||
__NOTOC__ | __NOTOC__ | ||
− | <center>[[CSC111 Spring 2015 | Main Page]] | [[CSC111_Syllabus_2015 | Syllabus ]] | [[CSC111_Class_Page_2015 | Weekly Schedule ]] | [[CSC111_Class_Page_2015#Links_and_Resources | Links & Resources ]] |[https://piazza.com/smith/spring2015/csc111/home Piazza]</center> | + | <center>[[CSC111 Spring 2015 | Main Page]] | [[CSC111_Syllabus_2015 | Syllabus ]] | [[CSC111_Class_Page_2015 | Weekly Schedule ]] | [[CSC111_Class_Page_2015#Links_and_Resources | Links & Resources ]] |[https://piazza.com/smith/spring2015/csc111/home Piazza]|[http://cs.smith.edu/classwiki/index.php/Computer_Science_TA_hours TA Hours]</center> |
<br /> | <br /> | ||
---- | ---- | ||
Line 91: | Line 91: | ||
---- | ---- | ||
* '''Friday''' | * '''Friday''' | ||
− | [[Image:JuliaMarinaInWeinstein.jpg|150px|right]] | + | <!--[[Image:JuliaMarinaInWeinstein.jpg|150px|right]]--> |
** Julia Edwards and Marina Cheng, on [https://www.facebook.com/groups/SmithiesInCS/ Smithies in CS]. Their presentation is available [[Media:SmithiesInCS2015.pdf|here]]. | ** Julia Edwards and Marina Cheng, on [https://www.facebook.com/groups/SmithiesInCS/ Smithies in CS]. Their presentation is available [[Media:SmithiesInCS2015.pdf|here]]. | ||
** eval(input( "Enter number" ) ) vs input(eval( "Enter number" )) | ** eval(input( "Enter number" ) ) vs input(eval( "Enter number" )) | ||
Line 144: | Line 144: | ||
:* Introduction to Homework 3 | :* Introduction to Homework 3 | ||
:* What are bits? | :* What are bits? | ||
− | : | + | :<center><videoflash>xaTywFdZrOk</videoflash></center> |
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week3Notes.pdf Lecture notes] | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week3Notes.pdf Lecture notes] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week3Notes2.pdf Additional lecture notes (Friday)] | ||
| | | | ||
Line 152: | Line 153: | ||
| | | | ||
* Chapter 3 in Zelle. | * Chapter 3 in Zelle. | ||
+ | * [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week3Notes.pdf Lecture notes] | ||
+ | * [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week3Notes2.pdf Additional lecture notes (Friday)] | ||
+ | <onlysmith> | ||
+ | * Some people were interested after Friday's class in the paper I mentioned on Genetic Programming. Here's a [[media:Langdon_2015_ieeeTEC.pdf|link]] to it. This is not the best paper to start reading about this subject, though. | ||
+ | </onlysmith> | ||
+ | * You may find this [https://www.cs.montana.edu/~bwall/cs580/introduction_to_gp.pdf paper] more appropriate as an introduction to the field, or [http://www.cs.bham.ac.uk/~wbl/biblio/cache/http___www.genetic-programming.com_jkpdf_burke2003tutorial.pdf this one], as well. | ||
+ | |||
+ | |||
|} | |} | ||
Line 167: | Line 176: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible " style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
− | |width="60%"| '''Topics''': | + | |width="60%"| '''Topics''': Lists, Strings, Mutable vs. Immutable lists. File Processing. |
|width="15%"| '''Lab/Hw''' | |width="15%"| '''Lab/Hw''' | ||
|width="25%"| '''Reading''' | |width="25%"| '''Reading''' | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday''' |
+ | ** Introduction to indexing in strings and lists. | ||
+ | ** Introduction to slicing strings (and list) | ||
+ | ** [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week4Notes.pdf Lecture notes] | ||
+ | ---- | ||
* '''Wednesday''': <font color="magenta">Rally Day</font>, no class, no labs. | * '''Wednesday''': <font color="magenta">Rally Day</font>, no class, no labs. | ||
+ | * '''Thursday''': no labs. | ||
+ | ---- | ||
+ | * '''Friday''' | ||
+ | ** Strings an Lists, continued | ||
+ | ** Strings are immutable. Lists are not. | ||
+ | ** Introduction to the concept of '''objects''' and '''methods''': String methods | ||
+ | ** [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week4Notes.pdf Lecture notes] | ||
| | | | ||
− | * Homework | + | * [[CSC111 Homework 4 2015 | Homework #4]] |
− | * '''No Labs this week''' | + | * '''No Labs this week''' (because of [http://www.smith.edu/events/rallyday_traditions.php Rally Day]), but there is a [[CSC111 Lab 4 2015 | Preparation page]] for the Homework (think of it as a lab to do on your own, and solution programs will be available). |
| | | | ||
− | * | + | * Chapter 5 in Zelle. |
|} | |} | ||
Line 196: | Line 216: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible " style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 203: | Line 223: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday''': 2/23 |
+ | :* Files (End of Chapter 5) | ||
+ | <center><videoflash>3owqvmMf6No</videoflash></center> | ||
+ | :* Functions (Chapter 6) | ||
+ | :* Passing parameters to functions | ||
+ | :* [[Google Finder.py Source Code| An example of a Python Utility with Functions]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week5Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Wednesday''':2/25 | ||
+ | :* Passing parameters to functions | ||
+ | :* Functions returning values | ||
+ | :* [[CSC111 Programming Examples Week 5| Programs developed in class]] | ||
+ | ---- | ||
+ | * '''Friday''': 2/27 | ||
+ | :* Functions that return values | ||
+ | :* Writing a program that generates "personalized" poems (quotes?) for everybody in the class. (This program is available on Moodle, as it contains private information) | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week5Notes.pdf Lecture notes] | ||
+ | |||
| | | | ||
− | * | + | * [[CSC111_Lab_5_2015 | Lab #5]], due 2/27 at 11:00 a.m. |
− | * | + | * [[CSC111_Hw_5_2015 | Homework #5]], due 3/3 at 11:55 p.m. |
| | | | ||
− | * | + | * Chapter 6 in Zelle: Functions |
|} | |} | ||
Line 214: | Line 251: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
Line 223: | Line 261: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible" style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 230: | Line 268: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * & | + | * '''Monday''' 3/2 |
+ | :* Boolean operators: < <= > >= != == | ||
+ | :* The '''if statement''' | ||
+ | :* if / if else | ||
+ | :* Making decisions in Python | ||
+ | :* [[CSC111 TellerRevisited.py | Teller machine program ready for if-statements]] | ||
+ | :* [[CSC111_Exercises_with_If_Statements_(Python_3) | Exercises]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week6Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Wednesday''' 3/4 | ||
+ | :* Practicing with functions | ||
+ | :* Continuation of if-statements | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week6Notes.pdf Lecture notes] | ||
+ | :* [[CSC111 Programming Examples Week 6| Programs developed in class]] | ||
+ | ---- | ||
+ | * '''Friday''' 3/6 | ||
+ | :* Continuation of if-statements: Boolean Operators | ||
+ | :* [[Turing_Test_and_Eliza | On the Turing Test and Eliza]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week6Notes.pdf Lecture notes] and [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week6bNotes.pdf addition]. | ||
+ | |||
+ | |||
| | | | ||
− | * Homework | + | * [[CSC111_Homework_6_2015 | Homework #6]] |
− | * Lab | + | * '''Lab #6''' will be given out in class, and is a series of review questions to prepare for the midterm. You can find it on [http://cs.smith.edu/dftwiki/index.php/CSC111_Midterm_Exam_Preparation_2015 this page]. |
| | | | ||
− | * | + | * Finish reading Chapter 6 (functions) in Zelle. |
+ | * Read Chapter 7 (If statements) in Zelle. | ||
|} | |} | ||
Line 241: | Line 300: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
Line 258: | Line 318: | ||
| | | | ||
* '''Monday''' 3/9 | * '''Monday''' 3/9 | ||
− | + | :* While Loops | |
− | :* | + | :* Graphics |
+ | :* [[CSC111 Programming Examples Week 7 2015 | Programming Examples (see lecture notes)]] | ||
+ | |||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week7Notes.pdf Lecture notes] | ||
---- | ---- | ||
* '''Wednesday''' 3/11 | * '''Wednesday''' 3/11 | ||
Line 265: | Line 328: | ||
---- | ---- | ||
* '''Friday''' 3/13 | * '''Friday''' 3/13 | ||
− | + | :* Loops, Graphics, and more... | |
− | :* | + | :* [[CSC111_And_now,_something_completely_different |and now, something completely different...]] |
− | + | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week7Notes.pdf Lecture notes] | |
− | |||
| | | | ||
− | * | + | * [[CSC111_Lab_7_2015 | Lab #7]] and [[CSC111_Lab_7_Moodle_2015 | accompanying submission page]]. |
− | * | + | * No Homework 7 this week. |
| | | | ||
− | * | + | * Indefinite loops are covered in Chapter 8. |
+ | * Graphics is covered in Chapter 4. | ||
|} | |} | ||
Line 296: | Line 359: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * <font color="magenta">SPRING BREAK</font> | + | * <center><font color="magenta">SPRING BREAK</font></center> |
+ | <!--center>[[Image:DancingCalvin.gif]]</center--> | ||
+ | <br /> | ||
+ | * [[CSC111 Exercises for Fun| If you get bored and want to do some programming in Python]] | ||
| | | | ||
| | ||
Line 310: | Line 376: | ||
---- | ---- | ||
{| style="width:100%" border="0" | {| style="width:100%" border="0" | ||
− | |width="45%"|'''Week | + | |width="45%"|'''Week 8''' Mar 23 |
|width="20%"| ''' ''' | |width="20%"| ''' ''' | ||
|width="25%"| ''' ''' | |width="25%"| ''' ''' | ||
Line 316: | Line 382: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible " style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 323: | Line 389: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday:''' 3/23 |
+ | :* Review of Loops and Booleans | ||
+ | :* Robustness of input | ||
+ | :* While True loops | ||
+ | :* break and continue | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week8Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Wednesday:''' 3/25 | ||
+ | :* Playing the game of Rock, Paper, Scissors | ||
+ | :* [[CSC111 Week 8 Programs 2015| Program developed in class]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week8Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Friday:''' 3/27 | ||
+ | :* Review Lab 8 | ||
+ | :* Man in Hole stories. | ||
+ | ::* An introduction by Kurt Vonnegut | ||
+ | <center><videoflash>oP3c1h8v2ZQ</videoflash></center> | ||
+ | :** Where to get books? [http://www.gutenberg.org/ From the Gutenberg eBook Project] | ||
+ | :** Recent articles about Man in the Hole: [http://www.theparisreview.org/blog/2015/02/04/man-in-hole/ Man in Hole] article, ''Paris Review of Books'', Feb. 2015, [http://www.theparisreview.org/blog/2015/03/19/man-in-hole-ii-man-in-deeper-hole/ Man in Deeper Hole], also in the ''Paris Review of Books,'' March 2015, and [http://motherboard.vice.com/read/computers-find-that-there-are-six-plots Only 6 book plots] article, in ''Motherboard.vice.com'', Feb. 2015. | ||
+ | ::* Can we program this in Python? [[Man In Hole story lines| A first approach: some programs]] | ||
+ | ::* [http://www.matthewjockers.net/ Matthew Jockers] at U. Nebraska, and [https://github.com/mjockers/syuzhet link to his R-Package] | ||
+ | ::* Extension of this type of work: [http://www.technologyreview.com/view/536061/twitter-data-mining-reveals-the-origins-of-support-for-islamic-state/ Looking for words is massive amounts of text]: MIT Technology Review article illustrates how data mining of twitter feed can reveal information about individual transformation/radicalization. | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week8Notes.pdf Lecture notes] | ||
| | | | ||
− | * Homework | + | * [[CSC111 Lab 8 2015| Lab #8]] |
− | * | + | * [[CSC111 Homework 8 2015 | Homework #8]] |
+ | * [[CSC111 Midterm Solution 2015 | Midterm solutions]] | ||
| | | | ||
− | * | + | * We're reviewing Chapter 8 in Zelle this week. |
|} | |} | ||
Line 334: | Line 423: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
{| style="width:100%" border="0" | {| style="width:100%" border="0" | ||
− | |width="45%"|'''Week | + | |width="45%"|'''Week 9''' Mar 30 |
|width="20%"| ''' ''' | |width="20%"| ''' ''' | ||
|width="25%"| ''' ''' | |width="25%"| ''' ''' | ||
Line 343: | Line 433: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible" style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 350: | Line 440: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday''': 3/30 |
+ | :* Exceptions | ||
+ | :* Classes and Objects | ||
+ | :* [[CSC111 Programs for Week 9 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week9Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | [[File:Cats.jpg|150px|right]] | ||
+ | * '''Wednesday''': 4/1 | ||
+ | :* [http://maven.smith.edu/~jfrankli/111s08/pairProgramming2000.pdf Pair programming] | ||
+ | :* Cats, cats, cats | ||
+ | ::* Creating a Cat class | ||
+ | ::* Default string representation: __str__() | ||
+ | ::* A list of cats | ||
+ | ::* Reading cats from a CSV file | ||
+ | ::* Searching a list of objects | ||
+ | :* [[CSC111 Programs for Week 9 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week9Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Friday''': 4/3 | ||
+ | [[Image:carDimensions.jpg|right|200px]] | ||
+ | :* Building a wheel, a car, a list of cars... | ||
+ | :* Graphic Objects | ||
+ | :* Horse objects. In the "Digital Horses" video, you get to see how the animators for the movie The Lord of the Rings create software ''objects'' to represent horses. In some parts of the video, below, you see that in some cases, horses are a collection of 3D shapes that are connected to each other, and move together around articulation points. This should remind you of how we built a car class around geometrical 2D objects. | ||
+ | <br /> | ||
+ | <center><videoflash>4GxPrESfdnM</videoflash></center> | ||
+ | <br /> | ||
+ | :* The video below shows similar examples of 3D objects, and lists of 3D objects where objects have their own behavior (the same way that our car objects have their own speed and direction of movement). | ||
+ | <center><videoflash>3wjCwtc_-hk</videoflash></center> | ||
+ | <br /> | ||
+ | :* [[CSC111 Programs for Week 9 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week9Notes.pdf Lecture notes] | ||
+ | :* (You can go to [http://www.printfreegraphpaper.com/ this site] to print graph paper) | ||
| | | | ||
− | * Homework | + | * [[CSC111_Homework_9_2015 | Homework 9]] |
− | * Lab | + | * [[CSC111 Lab 9 2015 | Lab #9]] |
| | | | ||
− | * | + | * [http://cs.smith.edu/dftwiki/images/1/17/ZelleGraphicsDescription.pdf Description of Graphics Library objects] |
+ | * Section 7.4 in Zelle, on Exceptions | ||
+ | * Chapter 10: Defining Classes | ||
|} | |} | ||
Line 361: | Line 484: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
{| style="width:100%" border="0" | {| style="width:100%" border="0" | ||
− | |width="45%"|'''Week | + | |width="45%"|'''Week 10''' Apr 6 |
|width="20%"| ''' ''' | |width="20%"| ''' ''' | ||
|width="25%"| ''' ''' | |width="25%"| ''' ''' | ||
Line 370: | Line 494: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible " style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 377: | Line 501: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday''' 4/6 |
+ | :* A detour from classes and objects | ||
+ | :* Nested for-loops for processing images | ||
+ | ::* RGB components | ||
+ | ::* Simple image transformations: shifting colors, black-and-white, borders, diagonals. | ||
+ | :* [[CSC111 Programs for Week 10 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week10Notes.pdf Lecture notes] | ||
+ | |||
+ | ---- | ||
+ | * '''Wednesday''' 4/8 | ||
+ | :* Creating a board and pieces for a game of checkers | ||
+ | :* [[CSC111 Programs for Week 10 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week10Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Friday''' 4/10 | ||
+ | [[Image:aquarium.png|150px|right]] | ||
+ | :* Continue with checkers: adding interactivity | ||
+ | ::* Removing checkers pieces with the mouse | ||
+ | ::* Moving checkers pieces with the mouse | ||
+ | :* Creating a virtual aquarium ([https://www.youtube.com/watch?v=m0933llkFoQ inspiration]) | ||
+ | ::* [[Fish_for_an_Aquarium| Fish images for a virtual aquarium]] | ||
+ | :* [[CSC111 Programs for Week 10 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week10Notes.pdf Lecture notes] | ||
| | | | ||
− | * Homework | + | * [[CSC111 Lab 10 2015 | Lab #10]] |
− | * | + | * [[CSC111 Homework 10 2015| Homework #10]] |
+ | * [[CSC111 Homework 10 Pick of the Week 2015| Sample of Cool Solution Cars]] | ||
| | | | ||
− | * | + | * No new material this week. Just playing with classes, objects, and graphics. |
|} | |} | ||
Line 388: | Line 535: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
{| style="width:100%" border="0" | {| style="width:100%" border="0" | ||
− | |width="45%"|'''Week | + | |width="45%"|'''Week 11''' Apr 13 |
|width="20%"| ''' ''' | |width="20%"| ''' ''' | ||
|width="25%"| ''' ''' | |width="25%"| ''' ''' | ||
Line 397: | Line 545: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible " style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 404: | Line 552: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday 4/13''' |
+ | :* Aquarium with fish and bubbles | ||
+ | :* Lists of lists: A quick way to process text information | ||
+ | :* [[CSC111 Programs for Week 11 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week11Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Wednesday 4/15''' | ||
+ | :* Class Inheritance | ||
+ | :* [[CSC111 Programs for Week 11 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week11Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Friday 4/17''': <font color="magenta">Guest lecture: Matthew Cornell</font>, Umass: Presentation of a Mobile App. in Python: [http://www.peepweather.com/ PeepWeather.com] | ||
| | | | ||
− | * | + | * [[CSC111 Lab 11 2015| Lab #11]] |
− | * | + | * [[CSC111 Homework 11 2015| Homework #11]] |
| | | | ||
− | * | + | * Chapter 11 in Zelle |
|} | |} | ||
Line 415: | Line 574: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
{| style="width:100%" border="0" | {| style="width:100%" border="0" | ||
− | |width="45%"|'''Week | + | |width="45%"|'''Week 12''' Apr 20 |
|width="20%"| ''' ''' | |width="20%"| ''' ''' | ||
|width="25%"| ''' ''' | |width="25%"| ''' ''' | ||
Line 424: | Line 584: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible" style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 431: | Line 591: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday 4/20''' |
+ | [[File:AnimatedTowersOfHanoi.gif|right]] | ||
+ | :* A look at Zelle's [[Zelle's_Graphics.py_for_Python_3| grahic library]] and the hierarchy of classes. | ||
+ | :* [[CSC111_Homework_10_Pick_of_the_Week_2015| Some of the cars and trucks of Homework 10]] | ||
+ | :* Recursion and Recursive Functions | ||
+ | :* [[CSC111 Programs for Week 12 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week12Notes.pdf Lecture notes] | ||
+ | ---- | ||
+ | * '''Wednesday 4/22''' | ||
+ | :* Continue with Recursion and Recursive Functions | ||
+ | :* Factorial | ||
+ | :* Visiting a Maze | ||
+ | :* [[CSC111 Programs for Week 12 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week12Notes.pdf Lecture notes] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week12AnimatedNotes.pdf Lecture notes (Animated Functions)] | ||
+ | ---- | ||
+ | * '''Friday 4/24''' | ||
+ | :* More recursion: fractal tree, maze, chessboard, hanoi | ||
+ | :* [[CSC111 Programs for Week 12 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week12Notes.pdf Lecture notes] | ||
| | | | ||
− | * | + | * [[CSC111 Lab 12 2015 | Lab #12]] |
− | * | + | * [[CSC111 Homework 12 2015| Homework #12]] |
| | | | ||
− | * | + | * Chapter 13 in Zelle. |
|} | |} | ||
Line 442: | Line 621: | ||
<br /><br /> | <br /><br /> | ||
+ | |||
==== ==== | ==== ==== | ||
---- | ---- | ||
{| style="width:100%" border="0" | {| style="width:100%" border="0" | ||
− | |width="45%"|'''Week | + | |width="45%"|'''Week 13''' Apr 27 |
|width="20%"| ''' ''' | |width="20%"| ''' ''' | ||
|width="25%"| ''' ''' | |width="25%"| ''' ''' | ||
Line 451: | Line 631: | ||
|} | |} | ||
<br /> | <br /> | ||
− | ::{| class="mw-collapsible | + | ::{| class="mw-collapsible " style="width:100%" border="1" |
|- style="background:#dddddd;" | |- style="background:#dddddd;" | ||
|width="60%"| '''Topics''': | |width="60%"| '''Topics''': | ||
Line 458: | Line 638: | ||
|-valign="top" | |-valign="top" | ||
| | | | ||
− | * | + | * '''Monday''' 4/27 |
+ | :* <font color="magenta">Guest Lecture</font>: Prof. Dana Leibsohn, Art Dept. | ||
+ | ---- | ||
+ | [[Image:tkinterDemo.png|right|150px]] | ||
+ | * '''Wednesday''' 4/29 | ||
+ | :* Introduction to GUI Programming with TKInter | ||
+ | ::* Demo | ||
+ | ::* Application | ||
+ | :* [[CSC111 Programs for Week 13 2015|Programs for lecture]] | ||
+ | :* [http://cs.smith.edu/dftwiki/media/CSC111_2015_Week13Notes.pdf Lecture notes] | ||
+ | :* If you are interested in playing with TKinter, here's a short [[Tutorial:TKInter_Lab| tutorial on TKinter]]. This tutorial is totally optional and not required for the for final exam. | ||
+ | |||
+ | ---- | ||
+ | * '''Friday''' 5/1 | ||
+ | :* Presentation of the [[CSC111_Final_Exam_2015|Final Exam]] | ||
| | | | ||
− | * | + | * No homework assignments this week! |
− | * Lab | + | * [[CSC111 Lab 13 2015| Lab 13]] |
| | | | ||
* | * | ||
|} | |} | ||
<br /> | <br /> | ||
− | = | + | |
+ | =Links and Resources= | ||
+ | <br /> | ||
+ | ==Graphics== | ||
+ | <br /> | ||
+ | * Zelle's graphic library can be found [http://cs.smith.edu/dftwiki/index.php/Zelle%27s_Graphics.py_for_Python_3 here] | ||
+ | * A [http://cs.smith.edu/dftwiki/index.php/Tk_Color_Names page] with color names supported by the graphics library. | ||
<br /> | <br /> | ||
==On-Line Python books== | ==On-Line Python books== | ||
Line 485: | Line 685: | ||
==Misc== | ==Misc== | ||
<br /> | <br /> | ||
− | * If you decide to work in pairs for the | + | * If you decide to work in pairs for the lab, you need to follow the protocol for 'pair programming' as discussed in [http://maven.smith.edu/~jfrankli/111s08/pairProgramming2000.pdf this article]. |
* Video talks on Python: | * Video talks on Python: |
Latest revision as of 08:44, 22 September 2015
--D. Thiebaut (talk) 15:00, 13 January 2015 (EST)
Week 1 Jan 26 |
Topics: Introduction, Python, Idle, Piazza, Moodle submission Lab/Hw Reading - Monday
- Syllabus
- Introduction to CSC111
- Lecture notes
- Wednesday
- Introduction to Idle, the integrated development environment (IDE) for the class
- Playing with our programming language, Python. The idea this week is to use intuition to put some Python code together and make it generate different outputs
- We will use these concepts, that will be covered in details starting next week.
- variables
- strings of characters
- loops
- Introduction to the Lab (Wednesday and Thursday afternoon)
- Lecture notes
- Friday
- Review of Lab 1
- Introduction to Homework 1, Q&A
- Go over a few problems, and understand how the def statement works.
- Variables
- Rules for labeling a variable
- CamelCase for regular variables, uppercase for constants
- Thinking of a variable as a box, or drawer.
- Variables can switch contents
- Lecture notes
- Lab #1 Prep.
- Lab #1
- Homework #1, due 2/3/15 at 11:55 p.m.
- Lecture notes
- Read Chapter 1 in Zelle (textbook)
- Monday
Week 2 Feb 2 |
Topics: Chapter 2: variables, definite loops, input Lab/Hw Reading - Monday: snow day!
- Wednesday
- Variables: simultaneous assignment
- Where do variables live?
- Programming: from problem to solution: an iterative process
- definite loops:
- looping through items in a list
- the range() function: allows iteration through various lists of numbers
- Input: getting information from the user (keyboard)
- Lecture notes
- Friday
- Julia Edwards and Marina Cheng, on Smithies in CS. Their presentation is available here.
- eval(input( "Enter number" ) ) vs input(eval( "Enter number" ))
- Programming Examples (see lecture notes)
- Lecture notes
- Lab #2
- Homework #2, due 2/10 at 11:55 p.m.
- Read Chapter 2 in Zelle.
Week 3 Feb 9 |
Topics: Arithmetic operators, math functions, main(). Lab/Hw Reading - Monday 2/9
- 4 minutes from Grier's video: When computers were human. Start at time=28m12s.
Women at work tabulating during World War II (Shorpy)
- Program organization: from now on, we will be using a main() function.
- Operators: * / + - ** // % abs()
- The type() function
- tellerMachine.py example.
- Formatting numbers (see Section 5.8.2 in Zelle), and example program
- Wednesday 2/11
- Accumulating results: summing up numbers, computing the factorial of a number.
- Programs developed in class
- Friday 2/13
- Review of Lab 3
- Introduction to Homework 3
- What are bits?
- Chapter 3 in Zelle.
- Lecture notes
- Additional lecture notes (Friday)
This section is only visible to computers located at Smith College
Week 4 Feb 16 |
Topics: Lists, Strings, Mutable vs. Immutable lists. File Processing. Lab/Hw Reading - Monday
- Introduction to indexing in strings and lists.
- Introduction to slicing strings (and list)
- Lecture notes
- Wednesday: Rally Day, no class, no labs.
- Thursday: no labs.
- Friday
- Strings an Lists, continued
- Strings are immutable. Lists are not.
- Introduction to the concept of objects and methods: String methods
- Lecture notes
- Homework #4
- No Labs this week (because of Rally Day), but there is a Preparation page for the Homework (think of it as a lab to do on your own, and solution programs will be available).
- Chapter 5 in Zelle.
- Monday
Week 5 Feb 23 |
Topics: Lab/Hw Reading - Monday: 2/23
- Files (End of Chapter 5)
- Functions (Chapter 6)
- Passing parameters to functions
- An example of a Python Utility with Functions
- Lecture notes
- Wednesday:2/25
- Passing parameters to functions
- Functions returning values
- Programs developed in class
- Friday: 2/27
- Functions that return values
- Writing a program that generates "personalized" poems (quotes?) for everybody in the class. (This program is available on Moodle, as it contains private information)
- Lecture notes
- Lab #5, due 2/27 at 11:00 a.m.
- Homework #5, due 3/3 at 11:55 p.m.
- Chapter 6 in Zelle: Functions
Week 6 Mar 2 |
Topics: Lab/Hw Reading - Monday 3/2
- Boolean operators: < <= > >= != ==
- The if statement
- if / if else
- Making decisions in Python
- Teller machine program ready for if-statements
- Exercises
- Lecture notes
- Wednesday 3/4
- Practicing with functions
- Continuation of if-statements
- Lecture notes
- Programs developed in class
- Friday 3/6
- Continuation of if-statements: Boolean Operators
- On the Turing Test and Eliza
- Lecture notes and addition.
- Homework #6
- Lab #6 will be given out in class, and is a series of review questions to prepare for the midterm. You can find it on this page.
- Finish reading Chapter 6 (functions) in Zelle.
- Read Chapter 7 (If statements) in Zelle.
Week 7 Mar 9 |
Topics: Lab/Hw Reading - Monday 3/9
- While Loops
- Graphics
- Programming Examples (see lecture notes)
- Wednesday 3/11
- In Class Midterm (closed books, closed computers)
- Friday 3/13
- Loops, Graphics, and more...
- and now, something completely different...
- Lecture notes
- Lab #7 and accompanying submission page.
- No Homework 7 this week.
- Indefinite loops are covered in Chapter 8.
- Graphics is covered in Chapter 4.
Week 8 Mar 16 |
Topics: Lab/Hw Reading -
SPRING BREAK
-
Week 8 Mar 23 |
Topics: Lab/Hw Reading - Monday: 3/23
- Review of Loops and Booleans
- Robustness of input
- While True loops
- break and continue
- Lecture notes
- Wednesday: 3/25
- Playing the game of Rock, Paper, Scissors
- Program developed in class
- Lecture notes
- Friday: 3/27
- Review Lab 8
- Man in Hole stories.
- An introduction by Kurt Vonnegut
- Where to get books? From the Gutenberg eBook Project
- Recent articles about Man in the Hole: Man in Hole article, Paris Review of Books, Feb. 2015, Man in Deeper Hole, also in the Paris Review of Books, March 2015, and Only 6 book plots article, in Motherboard.vice.com, Feb. 2015.
- Can we program this in Python? A first approach: some programs
- Matthew Jockers at U. Nebraska, and link to his R-Package
- Extension of this type of work: Looking for words is massive amounts of text: MIT Technology Review article illustrates how data mining of twitter feed can reveal information about individual transformation/radicalization.
- We're reviewing Chapter 8 in Zelle this week.
Week 9 Mar 30 |
Topics: Lab/Hw Reading - Monday: 3/30
- Exceptions
- Classes and Objects
- Programs for lecture
- Lecture notes
- Wednesday: 4/1
- Pair programming
- Cats, cats, cats
- Creating a Cat class
- Default string representation: __str__()
- A list of cats
- Reading cats from a CSV file
- Searching a list of objects
- Friday: 4/3
- Building a wheel, a car, a list of cars...
- Graphic Objects
- Horse objects. In the "Digital Horses" video, you get to see how the animators for the movie The Lord of the Rings create software objects to represent horses. In some parts of the video, below, you see that in some cases, horses are a collection of 3D shapes that are connected to each other, and move together around articulation points. This should remind you of how we built a car class around geometrical 2D objects.
- The video below shows similar examples of 3D objects, and lists of 3D objects where objects have their own behavior (the same way that our car objects have their own speed and direction of movement).
- Programs for lecture
- Lecture notes
- (You can go to this site to print graph paper)
- Description of Graphics Library objects
- Section 7.4 in Zelle, on Exceptions
- Chapter 10: Defining Classes
Week 10 Apr 6 |
Topics: Lab/Hw Reading - Monday 4/6
- A detour from classes and objects
- Nested for-loops for processing images
- RGB components
- Simple image transformations: shifting colors, black-and-white, borders, diagonals.
- Wednesday 4/8
- Creating a board and pieces for a game of checkers
- Programs for lecture
- Lecture notes
- Friday 4/10
- Continue with checkers: adding interactivity
- Removing checkers pieces with the mouse
- Moving checkers pieces with the mouse
- Creating a virtual aquarium (inspiration)
- No new material this week. Just playing with classes, objects, and graphics.
Week 11 Apr 13 |
Topics: Lab/Hw Reading - Monday 4/13
- Aquarium with fish and bubbles
- Lists of lists: A quick way to process text information
- Programs for lecture
- Lecture notes
- Wednesday 4/15
- Class Inheritance
- Programs for lecture
- Lecture notes
- Friday 4/17: Guest lecture: Matthew Cornell, Umass: Presentation of a Mobile App. in Python: PeepWeather.com
- Chapter 11 in Zelle
Week 12 Apr 20 |
Topics: Lab/Hw Reading - Monday 4/20
- A look at Zelle's grahic library and the hierarchy of classes.
- Some of the cars and trucks of Homework 10
- Recursion and Recursive Functions
- Programs for lecture
- Lecture notes
- Wednesday 4/22
- Continue with Recursion and Recursive Functions
- Factorial
- Visiting a Maze
- Programs for lecture
- Lecture notes
- Lecture notes (Animated Functions)
- Friday 4/24
- More recursion: fractal tree, maze, chessboard, hanoi
- Programs for lecture
- Lecture notes
- Chapter 13 in Zelle.
Week 13 Apr 27 |
Topics: Lab/Hw Reading - Monday 4/27
- Guest Lecture: Prof. Dana Leibsohn, Art Dept.
- Wednesday 4/29
- Introduction to GUI Programming with TKInter
- Demo
- Application
- Programs for lecture
- Lecture notes
- If you are interested in playing with TKinter, here's a short tutorial on TKinter. This tutorial is totally optional and not required for the for final exam.
- Friday 5/1
- Presentation of the Final Exam
- No homework assignments this week!
- Lab 13
Links and Resources
Graphics
- Zelle's graphic library can be found here
- A page with color names supported by the graphics library.
On-Line Python books
- disocovermagazine.com blog. Check out the answers posted by many readers. They contain some interesting links that you may find useful!
Python keywords
- The list of all the reserved words of the Python language
- and del for is raise assert elif from lambda return break else global not try class except if or while continue exec import pass yield def finally in print.
Python Programs in Textbook
- All the programs of Zelle's Python textbook
Misc
- If you decide to work in pairs for the lab, you need to follow the protocol for 'pair programming' as discussed in this article.
- Video talks on Python:
- a video of digital horses: what we can do with lists of objects!