Difference between revisions of "CSC111 Class Page 2010"

From dftwiki3
Jump to: navigation, search
(Weekly Schedule)
(Weekly Schedule)
 
(98 intermediate revisions by the same user not shown)
Line 107: Line 107:
 
----
 
----
 
* [[CSC111_Lab_3 | Lab #3 ]] and [[CSC111_Lab_3_Solution | Solution Programs]]
 
* [[CSC111_Lab_3 | Lab #3 ]] and [[CSC111_Lab_3_Solution | Solution Programs]]
* [[CSC111_Homework_3 | Homework #3]]
+
* [[CSC111_Homework_3 | Homework #3]] and [[CSC111 Homework 3 Solutions | solution programs]]  
 
||
 
||
 
* Chapter 3 in Zelle.   
 
* Chapter 3 in Zelle.   
Line 125: Line 125:
 
** [[CSC111 Exercises on Loops and Strings| Exercises]]
 
** [[CSC111 Exercises on Loops and Strings| Exercises]]
 
----
 
----
* [[CSC111_Lab_4 | Lab #4 ]]
+
* [[CSC111_Lab_4 | Lab #4 ]] and [[CSC111 Lab4 Solutions | solution programs]]
* [[CSC111_Homework_4 | Homework #4]]
+
* [[CSC111_Homework_4 | Homework #4]] and [[CSC111 Homework 4 Solution | Solutions]]
 
||
 
||
 
* Strings and string slices are described in Chapter 4.
 
* Strings and string slices are described in Chapter 4.
Line 135: Line 135:
 
| Week 5 <br /> 2/22 <br />
 
| Week 5 <br /> 2/22 <br />
 
||
 
||
 +
[[File:TaxiCabCSC111.png | right  | 150px]]
 
* '''Monday'''
 
* '''Monday'''
 +
** [[CSC111_Poets_publish_their_work | Poems]]!!!
 +
** Formatted output (Section 4.5.2 in Zelle)
 +
** Functions (Section 6.2 in Zelle)
 +
*** Syntax
 +
*** Scope
 +
*** Passing parameters
 +
*** Examples
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** [[CSC111 Exercises with Functions | Exercises: Understanding Functions]]
 +
** Top-down design
 +
** Introduction to graphics programming
 
* '''Friday'''
 
* '''Friday'''
 +
** A look at [[CSC111 Zelle graphics.py]], the graphics library
 +
** A few things to know about lists (shallow vs deep copy)
 +
** Top-Down design, one more time! [[CSC111 randomName.py | the crude undocumented program we put together in class...]].  And if you spend more time on it, you get [[CSC111 randomName2.py | this program]]...
 +
 
----
 
----
* [[CSC111_Lab_5 | Lab #5 ]]
+
* [[CSC111_Lab_5 | Lab #5 ]] and [[CSC111_lab5 Solutions | solution programs]]
* [[CSC111_Homework_5 | Homework #5]]
+
* [[CSC111_Homework_5 | Homework #5]] and its [[CSC111 Homework 5 Solution| solution program]]
 
||
 
||
 
&nbsp;  
 
&nbsp;  
 
+
*Read Section 6.2 in Zelle
 +
*Grahics programming is covered in Chapter 5
 +
* Functions and functions returning values are covered in Zelle, Chapter 6, Section 6.5
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
Line 149: Line 166:
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** Random poems, revisited: A look at the work of Eitan Mendelowitz on an interactive setup where random poems are generated. [http://www.aiaesthetic.com/DraftingPoems/1.mpg Eitan Mendelowitz's installation, Drafting Poems]<br />
 +
** In this video, play close attention to the digital horses, and how, in the preliminary movie, we see how the horses are just collections of fixed size blocks (cylinders) attached to each other. <videoflash>4GxPrESfdnM</videoflash><br />
 +
** In the next video, the scarabs are objects (''particles'') that move on their own, in a given direction, avoiding collision with objects. <videoflash>xTf3KiHx3h0</videoflash>
 +
** What happens if  you connect basic shapes together ''at random'', connect them with articulation points, give them energy to move one block around the other, and iterate hundred of thousands of times and keep the best solutions to generate new ones?<videoflash>_f-LORZ2EFU</videoflash><br /> (and  more videos on this [[Genetic_Programming_and_Music|page]]). <br />
 +
** Information about Homework assignment
 +
*** Current assignment: work on style!
 +
*** Use '''[[CSC111 listmyprogram utility| listmyprogram]]''' utility on Beowulf to spot long lines
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** Functions returning values ([[CSC111 Exercises on Functions Returning Values | Exercises]])
 +
** Class exercise: Putting 8 queens on a chess board[[CSC111 drawChessBoard.py|.]] <!-- drawChessBoard.py]]--> [[CSC111 NQueens.py| demo of N-queens program]]
 
* '''Friday'''
 
* '''Friday'''
 +
* Review of missed lab
 +
* Working with Files
 +
* <videoflash>uJKxUPlhvZY</videoflash>
 
----
 
----
* [[CSC111_Lab_6 | Lab #6 ]]
+
* [[CSC111_Lab_6 | Lab #6 ]] and [[CSC111 Lab 6 Solution Programs|solution programs]].
 
* Homework #6: Skipped for this week: prepare for midterm!
 
* Homework #6: Skipped for this week: prepare for midterm!
 
||
 
||
&nbsp;
+
* Read Chapter 5  in Zelle
 
+
* Read Chapter 6.
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
Line 162: Line 191:
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** Decision structures with '''if/else''' statements.
 +
** True/False
 +
** The syntax of an if statement
 +
** Using if-statements
 +
** Logic operators: ==, &lt;, &gt;, &lt;=, &gt;=, !=
 +
** Exercises
 
* '''Wednesday'''
 
* '''Wednesday'''
* '''Thursday''': '''<font color="orange">Midterm Exam</font>'''
+
** Q&A for Midterm
 +
** [[CSC111 Exercises with If statements | Exercises with if/else statements]]
 +
* '''Thursday''': '''<font color="orange">Midterm Exam</font>'''.  A list of typical problems given in past midterms can be found [[CSC111 Midterm Preparation| here]].  Solution programs for the midterm can be found [[CSC111 Midterm Solution Programs | here]].  [[CSC111 Midterm Grade Distribution | Grade Distribution]].
 +
 
 
* '''Friday'''
 
* '''Friday'''
 +
** [http://www.acacialt.com.au/ai/eliza.htm Introduction] to [[CSC111_Homework_7 | Homework #7]]
 +
** An interesting [[CSC111 Eliza Quote|quote]]
 +
** [[CSC111 Where does Python come from? | Something fun...]]
 
----
 
----
* [[CSC111_Lab_7 | Lab #7 ]]
+
* No Lab this week.  Midterm instead!
* [[CSC111_Homework_7 | Homework #7]] (due week after Spring break)
+
* [[CSC111_Homework_7 | Homework #7]] (due week after Spring break) and its [[CSC111 Homework 7 Solution | solution program]].
 
||
 
||
&nbsp;
+
* Sections 7.1 and 7.2 on Simple Decisions and Two-Way decisions in Zelle.
 +
 
 +
|}
  
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
|- style="background:#ffeeee" valign="top"
+
<!-- |- style="background:#ffeeee" valign="top"
 
| Week 8 <br /> 3/15<br />
 
| Week 8 <br /> 3/15<br />
 
||
 
||
 
<font color="orange">SPRING BREAK</font>
 
<font color="orange">SPRING BREAK</font>
<br>
+
<br>
 +
-->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
Line 182: Line 226:
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
  
                  <center>[[Image:calvinDancing.gif]]</center>
+
<!--center>[[Image:calvinDancing.gif]][[Image:calvinDancing.gif]]</center-->
 
+
<!-- center>[[Image:squirel.gif]]</center -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 
<!-- ------------------------------------------------------------------------------- -->
 +
<!--
 
||
 
||
 
&nbsp;
 
&nbsp;
 +
-->
  
<!-- ================================================================== -->
+
===<center>Spring Break</center>===
 +
 
 +
{| style="width:100%" border="1"
 +
|- style="background:#ffdead;"
 +
|'''Week''' || '''Topics''' || '''Reading'''
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
| Week 9 <br /> 3/22 <br />
+
|width="15%"| Week 9 <br /> 3/22  
||
+
|width="60%"|
 
* '''Monday'''
 
* '''Monday'''
 +
** Variations on a scheme: Graphics and if/else statements
 +
** [[CSC111 clickMe.py | clickMe.py]]
 +
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** Continue where we left off with [[CSC111 clickMe2.py | clickMe.py, Version 2]].  We stopped with this version: [[CSC111 clickMe3.py | clickMe.py, Version 3]].
 +
** Moving a ball around: [[CSC111 moveBall.py | moveBall.py]].  We stopped with this version: [[CSC111 moveBall2.py | moveBall.py, Version 2]]
 
* '''Friday'''
 
* '''Friday'''
 +
** Q&A and review of the lab
 +
** Using try/except
 +
** elif tests
 
----
 
----
* [[CSC111_Lab_8 | Lab #8 ]]
+
* [[CSC111_Lab_8 | Lab #8 ]] and [[CSC111 Lab 8 Solution Programs | Solution Programs]]
* [[CSC111_Homework_8 | Homework #8]]
+
* [[CSC111_Homework_8 | Homework #8]] and its [[CSC111 Homework 8 Solution | solution]].
 
||
 
||
&nbsp;
+
* We're still in Chapter 7 of Zelle. 
 +
* And we are done at the end of the week!
  
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
Line 209: Line 268:
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** Review of for loops: break, continue, return
 +
** A couple programs to start with: [[CSC111 For-Loop Programs | demo programs]]
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** While Loops
 +
** [[CSC111 Exercises on Loops|Loop Exercises]]
 +
** Accessing Web pages: [[CSC111 getWeather.py| getWeather.py]], a program that gets the temperature from http://www.weather.com/weather/today/01060
 
* '''Friday'''
 
* '''Friday'''
 +
** deMorgan's Laws
 +
** Python: language vs. libraries/modules
 +
** how to import modules/libraries
 +
** urllib2 (example with http://xgridmac.dyndns.org/cgi-bin/getWikiPageById.cgi)
 +
** Accessing data on the Web
 
----
 
----
* [[CSC111_Lab_9 | Lab #9 ]]
+
* [[CSC111_Lab_9 | Lab #9 ]] and [[CSC111 Lab 9 Solution Programs | solution programs]]
* [[CSC111_Homework_9 | Homework #9]]
+
* [[CSC111_Homework_9 | Homework #9]] and [[CSC111 Homework 9 Solutions | solution programs]]
 
||
 
||
&nbsp;
+
* Chapter 8
  
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
Line 222: Line 291:
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** Introduction to OOP
 +
** OOP and graphics
 +
** [[CSC111 A class for a simple car| Python programs defining and using classes]]
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** Creating a class for a car using the class Wheel created on Monday
 +
** Another class example holding student information
 +
*** [[CSC111 studentClass Programs | studentClassN.py]]
 
* '''Friday'''
 
* '''Friday'''
 +
** [[CSC111 Lab10 Solution 1 | Solution program for Lab 10]], Part 1.
 
----
 
----
 
* [[CSC111_Lab_10 | Lab #10 ]]
 
* [[CSC111_Lab_10 | Lab #10 ]]
* [[CSC111_Homework_10 | Homework #10]]
+
* [[CSC111_Homework_10 | Homework #10]] and its [[CSC111 Homework 10 Solution | solution program]]
 
||
 
||
&nbsp;
+
Read Chapter 10!
  
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
| Week 12 <br /> 4/12<br />
+
| Week&nbsp;12&nbsp;&nbsp; <br /> 4/12<br />
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** [[CSC111 defaultParameters.py | Default parameter values]]
 +
** More programming with classes: [[CSC111 studentClass Programs | studentClassN.py]]
 +
** Date/Time example [[CSC111 DateTimeExample.py | program]]
 +
** Sending mail from a [[CSC111 sendMail.py | Python program]]
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** Class inheritance: [[CSC111 myRectangle2.py | myRectangle2.py]]
 +
** Using the graphics car of Lab10 as the base and derived classes
 +
*** [[CSC111 carLab10.py | carLab10.py ]]
 +
*** [[CSC111 newCarLab10.py | newCarLab10.py ]]
 +
 
* '''Friday''': <font color="orange">No Class</font>
 
* '''Friday''': <font color="orange">No Class</font>
 
----
 
----
* [[CSC111_Lab_11 | Lab #11 ]]
+
* [[CSC111_Lab_11 | Lab #11 ]] and [[CSC111 Lab 11 Solution Program | Solution]]
* [[CSC111_Homework_11 | Homework #11]]
+
* [[CSC111_Homework_11 | Homework #11]] and its [[CSC111 Homework 11 solution program]]
 
||
 
||
&nbsp;
+
* We're still in Chapter 10.
 +
* Default argument (parameter) values are covered in [http://docs.python.org/tutorial/controlflow.html#default-argument-values Python.org]
  
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
Line 248: Line 334:
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** Review last lab ([[CSC111 Lab 11 Solution Program | lab11.py]])
 +
** Creating a module with [[CSC111 newCarLab10.py | newCar.py]], containing an inherited class.
 +
** A view of Programming Languages
 +
<center><videoflash>cc5gIj3jz44</videoflash></center>
 +
<center><videoflash>1uIzS1uCOcE</videoflash></center>
 +
 
* '''Wednesday'''
 
* '''Wednesday'''
 +
** A word on [http://docs.python.org/tutorial/datastructures.html#list-comprehensions list comprehension].  Look for an illustration of this python feature in the [[CSC111_Homework_10_Solution |solution program for HW 10]]
 +
** Dictionaries.  How to use them.  How they work.
 +
** Ulysses by James Joyce: available [http://www.gutenberg.org/files/4300/4300.zip here]...
 +
** [http://en.wikipedia.org/wiki/Letter_frequency Letter Frequency in English] and other languages...
 +
** [[CSC111 Search1M.py| search1M.py]] search in a million-record list
 +
** [[CSC111 Search1MHash.py | search1MHash.py]] search in a million-record hash table
 +
** Dictionaries: [[CSC111 countwords.py| countwords.py]]
 
* '''Friday'''
 
* '''Friday'''
 +
** Designing a new language from scratch.
 +
** Review Lab
 
----
 
----
* [[CSC111_Lab_12 | Lab #12 ]]
+
* [[CSC111_Lab_12 | Lab #12 ]] and [[CSC111 Lab 12 Solution | Solution program]]
* [[CSC111_Homework_12 | Homework #12]]
+
* [[CSC111_Homework_12 | Homework #12]] and its [[CSC111 Homework 12 Solutions | solution programs]]
 
||
 
||
&nbsp;
+
* Dictionaries are covered in Chapter 11
 +
* List comprehension is presented in [http://docs.python.org/tutorial/datastructures.html#list-comprehensions Python.org], Section 5.1.4 in [http://docs.python.org]
  
 
<!-- ================================================================== -->
 
<!-- ================================================================== -->
Line 261: Line 363:
 
||
 
||
 
* '''Monday'''
 
* '''Monday'''
 +
** [[CSC111 Experiment: Designing a new language| Designing a new language]]
 +
::<videoflash>5X8cM2JiqzI</videoflash>
 +
** Introduction to Recursion
 +
***[[CSC111 RecursiveFactorial.py | factorial.py]]
 +
***[[CSC111 BinarySearch.py | binarySearch.py ]]
 +
[[Image:SuperMan.jpg|100px|right]]
 
* '''Wednesday'''
 
* '''Wednesday'''
* '''Friday''': <font color="orange">Last Class</font>: Final take home exam
+
***[[CSC111 RecursiveFactorial.py | factorial.py]]
 +
***[[CSC111 BinarySearch.py | binarySearch.py ]]
 +
**[[CSC111 maze.py | maze.py]]
 +
* '''Friday''': <font color="orange">Last Class</font>
 +
** Presentation of the Final take home exam
 
----
 
----
* [[CSC111_Lab_13 | Lab #13 ]]
+
* [[CSC111_Lab_13 | Lab #13 ]] and [[CSC111 Lab 13 Solutions | solution programs]]
 
* [[CSC111_Final_Exam | Final Exam]]
 
* [[CSC111_Final_Exam | Final Exam]]
 
||
 
||
&nbsp;
+
* Recursion is covered in Chapter 13.  Read Sections 13.1 and 13.2.
 
 
 
|}
 
|}
  

Latest revision as of 09:17, 2 April 2015

Main Page | Syllabus | Weekly Schedule | Links & Resources




Prof and TAs

Dominique Thiébaut email
Dept. Computer Science
Ford Hall, 356.
Telephone: 3854
Office hours TBA, and by appointments

 



Click here for TA hours this week.

Weekly Schedule

Week Topics Reading
Week 1
1/25
  • Monday
    • Review syllabus
    • Introduction to computer programming

  • Wednesday
    • keywords: 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
    • Variables
    • Data types
    • Functions
    • Parameter passing
  • Friday

  • Read Chapter 1 in Zelle.
  • Read the article on pair programming. We will discuss it in class on Monday 2/1.
Week 2
2/1


Week 3
2/8

  • Chapter 3 in Zelle.
    • The math library (I will not cover it in class, but you should read it)
    • Type conversion (important!)
Week 4
2/15
  • Monday
    • Types, operators
    • Working with indexes and strings
    • Slicing up strings
  • Wednesday No class, Rally Day
  • Friday

Week 5
2/22
TaxiCabCSC111.png

 

  • Read Section 6.2 in Zelle
  • Grahics programming is covered in Chapter 5
  • Functions and functions returning values are covered in Zelle, Chapter 6, Section 6.5
Week 6
3/1
  • Monday
    • Random poems, revisited: A look at the work of Eitan Mendelowitz on an interactive setup where random poems are generated. Eitan Mendelowitz's installation, Drafting Poems
    • In this video, play close attention to the digital horses, and how, in the preliminary movie, we see how the horses are just collections of fixed size blocks (cylinders) attached to each other.
    • In the next video, the scarabs are objects (particles) that move on their own, in a given direction, avoiding collision with objects.
    • What happens if you connect basic shapes together at random, connect them with articulation points, give them energy to move one block around the other, and iterate hundred of thousands of times and keep the best solutions to generate new ones?
      (and more videos on this page).
    • Information about Homework assignment
      • Current assignment: work on style!
      • Use listmyprogram utility on Beowulf to spot long lines
  • Wednesday
  • Friday
  • Review of missed lab
  • Working with Files

  • Read Chapter 5 in Zelle
  • Read Chapter 6.
Week 7
3/8
  • Monday
    • Decision structures with if/else statements.
    • True/False
    • The syntax of an if statement
    • Using if-statements
    • Logic operators: ==, <, >, <=, >=, !=
    • Exercises
  • Wednesday
  • Thursday: Midterm Exam. A list of typical problems given in past midterms can be found here. Solution programs for the midterm can be found here. Grade Distribution.

  • Sections 7.1 and 7.2 on Simple Decisions and Two-Way decisions in Zelle.


Spring Break

Week Topics Reading
Week 9
3/22
  • Monday
    • Variations on a scheme: Graphics and if/else statements
    • clickMe.py

  • We're still in Chapter 7 of Zelle.
  • And we are done at the end of the week!
Week 10
3/29

  • Chapter 8
Week 11
4/5

Read Chapter 10!

Week 12  
4/12
  • Friday: No Class

  • We're still in Chapter 10.
  • Default argument (parameter) values are covered in Python.org
Week 13
4/19
  • Monday
    • Review last lab ( lab11.py)
    • Creating a module with newCar.py, containing an inherited class.
    • A view of Programming Languages

  • Dictionaries are covered in Chapter 11
  • List comprehension is presented in Python.org, Section 5.1.4 in [1]
Week 14
4/26
SuperMan.jpg

  • Recursion is covered in Chapter 13. Read Sections 13.1 and 13.2.

...


Links and Resources

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

Linux

Misc

  • If you decide to work in pairs for the homework assignments, you need to follow the protocol for 'pair programming' as discussed in this article.
  • All the programs of Zelle's Python textbook

Software

  • Using SSH on Windows, Linux, or on a Mac with OS X

Math









Back To Main Page