Difference between revisions of "CSC111 Class Page 2015b"

From dftwiki3
Jump to: navigation, search
( )
( )
 
(22 intermediate revisions by the same user not shown)
Line 17: Line 17:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': Introduction, Python, Idle, Piazza, Moodle submission
 
|width="60%"| '''Topics''': Introduction, Python, Idle, Piazza, Moodle submission
Line 27: Line 27:
 
** Syllabus
 
** Syllabus
 
** Expectations
 
** Expectations
** [http://cs.smith.edu/~jfrankli/111s08/pairProgramming2000.pdf Pair Programming] ([https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=video&cd=29&ved=0CEYQtwIwCDgUahUKEwi2yO-f3ODHAhWIyj4KHY5-APM&url=https%3A%2F%2Fcodehire.com%2Fcodrtv%2Fvideos%2Fhabit-1-pair-programming&usg=AFQjCNEEtWUOmKBCeZpYbg7jKupwi6Lo0w&sig2=B2ABNk1KINm_Zb8m2MmPTA video to watch on your own])
+
** [http://cs.smith.edu/~jfrankli/111s08/pairProgramming2000.pdf Pair Programming] \
 
::<center><videoflash>vgkahOzFH2Q</videoflash>
 
::<center><videoflash>vgkahOzFH2Q</videoflash>
 
** A feel for coding in Python
 
** A feel for coding in Python
Line 63: Line 63:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible" style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''':  Chapter 2: variables, definite loops, input
 
|width="60%"| '''Topics''':  Chapter 2: variables, definite loops, input
Line 113: Line 113:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible" style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': Arithmetic operators, math functions, main().
 
|width="60%"| '''Topics''': Arithmetic operators, math functions, main().
Line 178: Line 178:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''':  
 
|width="60%"| '''Topics''':  
Line 229: Line 229:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': Functions, Files.
 
|width="60%"| '''Topics''': Functions, Files.
Line 273: Line 273:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''':  
 
|width="60%"| '''Topics''':  
Line 310: Line 310:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': Processing Files
 
|width="60%"| '''Topics''': Processing Files
Line 355: Line 355:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''':  
 
|width="60%"| '''Topics''':  
Line 407: Line 407:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': Exceptions, Classes, and Objects
 
|width="60%"| '''Topics''': Exceptions, Classes, and Objects
Line 472: Line 472:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible mw-collapsed" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': Image Processing
 
|width="60%"| '''Topics''': Image Processing
Line 529: Line 529:
 
|}
 
|}
 
<br />
 
<br />
::{| class="mw-collapsible" style="width:100%" border="1"
+
::{| class="mw-collapsible " style="width:100%" border="1"
 
|- style="background:#dddddd;"
 
|- style="background:#dddddd;"
 
|width="60%"| '''Topics''': LAM, User Interface, Widgets, Button, digitizing and rendering a Map
 
|width="60%"| '''Topics''': LAM, User Interface, Widgets, Button, digitizing and rendering a Map
Line 632: Line 632:
 
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week13bNotes.pdf Lecture Notes]
 
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week13bNotes.pdf Lecture Notes]
 
----
 
----
 +
[[Image:CardDimensions2.jpg|right|150px]]
 
* '''Wednesday'''
 
* '''Wednesday'''
[[Image:CardDimensions2.jpg|right|150px]]
+
:* Introduction to ''Class Inheritance''
:* Introduction to Class Inheritance
 
 
:* [[CSC111_Python_Programs_Fall_2015#Nov._30.2C_2015| Programs developed in class]]
 
:* [[CSC111_Python_Programs_Fall_2015#Nov._30.2C_2015| Programs developed in class]]
 
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week13bNotes.pdf Lecture Notes]
 
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week13bNotes.pdf Lecture Notes]
 +
<br />
 +
<br />
 +
<br />
 
----
 
----
 
* '''Friday'''
 
* '''Friday'''
 +
:* Continuation of the concept of Class Inheritance
 +
:* Introduction to ''Polymorphism''
 +
:* [[CSC111_Python_Programs_Fall_2015#Nov._30.2C_2015| Programs developed in class]]
 +
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week13bNotes.pdf Lecture Notes]
 +
 
|
 
|
 
* [[CSC111 Lab 12 2015b | Lab #12]]
 
* [[CSC111 Lab 12 2015b | Lab #12]]
* Homework #12
+
* [[CSC111 Homework 12 2015b| Homework 12]]
 
|
 
|
 
* Chapter 11 on Lists of lists
 
* Chapter 11 on Lists of lists
Line 666: Line 674:
 
|-valign="top"
 
|-valign="top"
 
|
 
|
 +
[[File:MinionBanana.jpg|right|100px]]
 
* '''Monday''':
 
* '''Monday''':
 +
:* Introduction to Recursion and Recursive Functions
 +
:* Class exercise with a ''bunch of bananas''.  Everbybody's a minion...
 +
:* Finding a banana, recursively
 +
:* [[CSC111_Python_Programs_Fall_2015#Nov._30.2C_2015| Programs developed in class]]
 +
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week14bNotes.pdf Lecture Notes]
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 
----
 
----
 +
[[File:AnimatedTowersOfHanoi.gif|right]]
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
:* [[CSC111_Homework_11_Samples_2015|A look at some of the Maps of HW 11.]]
 +
:* Visiting a Maze
 +
:* Fractal Trees
 +
:* Revisiting the Towers of Hanoi problem
 +
:* [[CSC111_Python_Programs_Fall_2015#Mon._12.2F07.2F15| Programs developed in class]]
 +
:* [http://cs.smith.edu/dftwiki/media/CSC111_2015b_Week14bNotes.pdf Lecture Notes]
 +
<br />
 +
 
----
 
----
 
* '''Friday'''
 
* '''Friday'''
 +
:* No Class!
 +
:* [[CSC111 Wrapping Paper| A sample of wrapping paper styles...]]
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 
|
 
|
* Lab
+
* [[CSC111_Lab_13_2015b | Lab 13]]
 
|
 
|
*  
+
* Read Chapter 13 in Zelle.
 
|}
 
|}
  
Line 699: Line 734:
  
 
|
 
|
* Final Exam
+
* [[CSC111 Final Exam 2015b|Final Exam]]
 
|
 
|
*
+
 
|}
 
|}
  

Latest revision as of 20:06, 24 January 2018

--D. Thiebaut (talk) 11:12, 24 August 2015 (EDT)



Main Page | Syllabus | Weekly Schedule | Links & Resources |Piazza





 


Week 1 Sept 7    


Topics: Introduction, Python, Idle, Piazza, Moodle submission Lab/Hw Reading

  • Friday
    • Review of the lab
    • Variables
    • assignment,
    • variable names
    • camelCase notation
    • Exercises
    • Lecture Notes




 


Week 2 Sept. 14    


Topics: Chapter 2: variables, definite loops, input Lab/Hw Reading
  • Monday: (Lecture presented by Prof. Joe O'Rourke)
    • 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


  • Friday
  • Numbers of the day:
  • Read Chapter 2 in Zelle.




 


Week 3 Sept. 21    


Topics: Arithmetic operators, math functions, main(). Lab/Hw Reading
  • Monday:
  • Finish the grade program from Friday ( Programs developed in class)
  • 4 minutes from Grier's video: When computers were human. Start at time=28m12s.



WomenCalculatingWWII.jpg
Women at work tabulating during World War II (Shorpy)


  • Wednesday
  • Review the tellerMachine.py program. Review a student's solution using a loop.
  • Printing formatted integers and floats with the { } format.
  • Review the bar-graph problem and use the { } format to print the box.
  • Program organization: from now on, we will be using a main() function.
  • int(), round(), float(), abs() ==> the idea of robustness
  • Rule for all programs: add a blank line between input section and output section.
  • Accumulating results in loops. Example: computing the average age of students in the class.
  • Accumulating strings in a loop: Generage a string of 5 groups: "**--**--**"
  • Programs developed in class

  • Friday


  • Lab 3
  • Homework 3
  • Solution programs can be found at the end of the lab and homework pages
  • Read Chapter 3 in Zelle.




 


Week 4 Sept. 28    


Topics: Lab/Hw Reading
  • Monday:
  • Video class today. The class is covered in 3 different videos. Click on the video icons below, from left to right, please!
VideoLogo.png   VideoLogo.png   VideoLogo.png



  • Wednesday

  • Friday
  • Lab 4
  • Homework 4
  • Solution programs can be found at the end of the lab and homework pages
  • Read Chapter 6 in Zelle




 


Week 5 Oct 5    


Topics: Functions, Files. Lab/Hw Reading
  • Monday:

  • Wednesday
  • Mountain Day?

  • Friday

VideoLogo.png

  • We are still working with material from Chapter 6.




 


Week 6 Oct. 12    


Topics: Lab/Hw Reading
  • Monday: Fall Break

  • Wednesday

  • Friday: Midterm Exam




 


Week 7 Oct 19    


Topics: Processing Files Lab/Hw Reading
  • Monday:
  • Finish Dynamic Web Page example
  • The IF statement
  • Boolean values: True and False

  • Wednesday
  • Boolean operators: and, or, and not
  • Graphics

  • Friday
  • Graphic objects: everything is an object!
  • Measuring distances between points on the graphic window.
  • Something fun: Eliza

VideoLogo.png




 


Week 8 Oct. 26    


Topics: Lab/Hw Reading
POMFall2015.png
  • Monday:
  • Review if statements and Boolean variables
  • Exercises on boolean variables and boolean functions
  1. is there a negative number in a list of numbers?
  2. count the number of negative numbers in a list of numbers




  • Wednesday
  • Exact and Inexact Matching Algorithms
  • Break and Continue
  • Lecture Notes

  • Friday
  • Exercise with While loop
  • Programming patterns for looking at text data (review of Lab 8)
  • Processing Text
  • Man in the Hole (Kurt Vonnegut, Matthew Jokers)
  • Memory Project (Tim O'Brien, Wordle)

VideoLogo.png

  • Indefinite loops are covered in Chapter 8 in Zelle.




 


Week 9 Nov. 2    


Topics: Exceptions, Classes, and Objects Lab/Hw Reading
  • Monday:

  • Wednesday
Cats.jpg
  • 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
CarDimensions.jpg
TaxiCabCSC111.png
  • Object-Oriented Graphics
  • Creating a wheel class
  • Moving the wheel
  • Creating a car class
  • Moving the car
  • A list of cars...
  • 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).





 


Week 10 Nov 9    


Topics: Image Processing Lab/Hw Reading
  • Monday:
CatGlasses.gif
  • Image processing
  • Displaying gif images
  • Sweep through an image: vertical sweep, horizontal sweep
  • Changing the color of a pixel
  • Changing the color of all the pixels of an image
  • Grey scales
  • Saturation
  • Lecture Notes
  • Programs developed in class

  • Wednesday
Piece.gif
Piece2.gif

  • Friday
  • No class today (conference in Seattle), but there is a video lecture to watch on your own... Stay tuned!
VideoLogo.png




 


Week 11 Nov 16    


Topics: LAM, User Interface, Widgets, Button, digitizing and rendering a Map Lab/Hw Reading
  • Monday:
  • Introduction to the LAM project this week
  • The problem we will solve this week
  • User Interface: widgets and buttons
  • Using buttons to control user interaction
  • Polygons. Creating polygons, saving polygons to a CSV file
  • Lecture Notes
  • Programs developed in class

  • Wednesday

  • Friday
AquariumWithFish.png




 


Week 12 Nov 23    


Topics: Lab/Hw Reading
  • Monday:
GuidoVanRossun.jpg

  • Wednesday: Thankgiving Break

  • Friday: Thankgiving Break
  • No Lab
  • No Homework. Just the continuation of Homework 11.
  • Zelle, Section 11.6 on Dictionaries.




 


Week 13 Nov 30    


Topics: Lists of lists, Inheritance Lab/Hw Reading
  • Monday:

CardDimensions2.jpg
  • Wednesday





  • Friday
  • Chapter 11 on Lists of lists
  • Chapter 12 in Zelle, on Objects and Inheritance




 


Week 14 Dec 7    


Topics: Recursion Lab/Hw Reading
MinionBanana.jpg
  • Monday:







AnimatedTowersOfHanoi.gif
  • Wednesday



  • Friday






  • Read Chapter 13 in Zelle.




 


Week 15 Dec 14    


Topics: Lab/Hw Reading
  • Monday: Last Class: Presentation of the take-home final exam, which will be due at 4:00 p.m. on the last day of exams.







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


  • When you work in pairs during the labs, or on homework assignments, you need to follow the protocol for 'pair programming' as discussed in this article.


Maps of Smith College


This section contains various maps to be used in the Liberal Arts Module (LAM). If you want to use one of these images, and want the original, click twice on the image, until you get it by itself, full size, in your browser. Then you can either right click or control click on it to save it to your computer.

Original Map from GIS Center, Smith College


This map was generated by Emily Kim.
The original of the image below can be found here. It is huge, be careful!
GISSmithCollegeMapResized.jpg

Edited Full Map, Smith College, PNG format


GISMapSmithCollege.png

Edited, Cropped Map, Smith College, GIF format


This image is 750 × 730 pixels.
SmithMap0.gif

Additional Maps from the Smith GIS lab


Thanks to Jon Caris, of the GIS Lab, for sending these maps.

SmithMapBuildings.jpg


SmithMapBuildingsTrees.jpg


SmithMapTrees.jpg


(The darker trees are conifers)