Difference between revisions of "CSC111 Class Page 2011"

From dftwiki3
Jump to: navigation, search
(Weekly Schedule)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<center>[[CSC111_2011 | Main Page]] | [[CS111_Syllabus_2011 | Syllabus ]] | [[CSC111_Class_Page_2011 | Weekly Schedule ]] | [[CSC111_Class_Page_2011#Links_and_Resources | Links & Resources ]]</center>
+
<center>[[CSC111_2011 | Main Page]] | [[CS111_Syllabus_2011 | Syllabus ]] | [[CSC111_Class_Page_2011 | Weekly Schedule ]] | [[CSC111_Class_Page_2011#Links_and_Resources | Links & Resources ]] | [http://piazza.com/smith/spring2014/csc111/home Piazza]</center>
 
<br />  
 
<br />  
 
----
 
----
Line 19: Line 19:
 
<br /><br />
 
<br /><br />
 
To see when and where TAs are available this week, click [http://cs.smith.edu/classwiki/index.php/Computer_Science_TA_hours here].
 
To see when and where TAs are available this week, click [http://cs.smith.edu/classwiki/index.php/Computer_Science_TA_hours here].
 +
 +
<onlydft>
 +
Ideas for next time: http://www.pippinbarr.com/games/theartistispresent/TheArtistIsPresent.html
 +
</onlydft>
  
 
=Weekly Schedule=
 
=Weekly Schedule=
 +
  
 
{| style="width:100%" border="1"
 
{| style="width:100%" border="1"
Line 26: Line 31:
 
|'''Week''' || '''Topics''' || '''Reading'''  
 
|'''Week''' || '''Topics''' || '''Reading'''  
  
<!-- ================================================================== -->
+
 
 
|-valign="top"
 
|-valign="top"
 
|width="15%"| Week 1 <br /> 9/8  
 
|width="15%"| Week 1 <br /> 9/8  
Line 46: Line 51:
 
** Test yourself with the Programming Exercises at the end of the chapter.
 
** Test yourself with the Programming Exercises at the end of the chapter.
 
* Read the [http://maven.smith.edu/~jfrankli/111s08/pairProgramming2000.pdf article] on pair programming.  We will discuss it in class on Th 9/15.
 
* Read the [http://maven.smith.edu/~jfrankli/111s08/pairProgramming2000.pdf article] on pair programming.  We will discuss it in class on Th 9/15.
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 2 <br /> 9/13<br />
 
| Week 2 <br /> 9/13<br />
Line 53: Line 58:
 
** 5 minutes with Guido von Rossum
 
** 5 minutes with Guido von Rossum
 
<br />
 
<br />
 +
 +
 
{{#widget:Google Video
 
{{#widget:Google Video
 
|docid=-7758421725489622662
 
|docid=-7758421725489622662
Line 58: Line 65:
 
|height=326
 
|height=326
 
}}
 
}}
 +
 
<br />
 
<br />
 +
  
 
** A word about semantics: a look back at the challenge solutions for [[CSC111_Lab_1_2011 | Lab #1 ]]
 
** A word about semantics: a look back at the challenge solutions for [[CSC111_Lab_1_2011 | Lab #1 ]]
Line 90: Line 99:
 
** We're starting on Tuesday with material from Chapter 2.  In particular understanding variables and assignments, and the temperature conversion program.
 
** We're starting on Tuesday with material from Chapter 2.  In particular understanding variables and assignments, and the temperature conversion program.
  
<!-- ================================================================== -->
+
 
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
 
| Week 3 <br /> 9/20<br />
 
| Week 3 <br /> 9/20<br />
Line 112: Line 121:
 
* Reading
 
* Reading
 
* On Tuesday we'll cover some material from Sections 2.5 (assignment) and 2.6 (definite loops) in Zele.
 
* On Tuesday we'll cover some material from Sections 2.5 (assignment) and 2.6 (definite loops) in Zele.
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 4 <br /> 9/27<br />
 
| Week 4 <br /> 9/27<br />
Line 146: Line 155:
  
  
<!-- ================================================================== -->
+
 
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
 
| Week 5 <br /> 10/4<br />
 
| Week 5 <br /> 10/4<br />
Line 177: Line 186:
 
* Reading
 
* Reading
 
** Chapter 4 on Graphics
 
** Chapter 4 on Graphics
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 6 <br /> 10/11<br />
 
| Week 6 <br /> 10/11<br />
Line 206: Line 215:
 
||
 
||
 
* Reading
 
* Reading
<!-- ================================================================== -->
+
 
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
 
| Week 7 <br /> 10/18<br />
 
| Week 7 <br /> 10/18<br />
Line 270: Line 279:
 
* Reading
 
* Reading
  
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 9 <br /> 11/1<br />
 
| Week 9 <br /> 11/1<br />
Line 291: Line 300:
 
** Functions returning values are covered in Section 6.5.1.
 
** Functions returning values are covered in Section 6.5.1.
 
** Read section 6.6
 
** Read section 6.6
<!-- ================================================================== -->
+
 
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
 
| Week 10 <br /> 11/8<br />
 
| Week 10 <br /> 11/8<br />
Line 322: Line 331:
 
** Text file processing: Section 5.9
 
** Text file processing: Section 5.9
 
** While loops: Chapter 8
 
** While loops: Chapter 8
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 11 <br /> 11/15<br />
 
| Week 11 <br /> 11/15<br />
Line 359: Line 368:
 
** Common loop patterns are covered in Section 8.3
 
** Common loop patterns are covered in Section 8.3
  
<!-- ================================================================== -->
+
 
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
 
| Week 12<br /> 11/22<br />
 
| Week 12<br /> 11/22<br />
Line 376: Line 385:
 
* Reading
 
* Reading
  
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 13 <br /> 11/29<br />
 
| Week 13 <br /> 11/29<br />
Line 401: Line 410:
 
* Reading
 
* Reading
 
** Classes are covered in Chapter 10 of the textbook.  
 
** Classes are covered in Chapter 10 of the textbook.  
<!-- ================================================================== -->
+
 
 
|- style="background:#ffffff" valign="top"
 
|- style="background:#ffffff" valign="top"
 
| Week 14<br /> 12/6<br />
 
| Week 14<br /> 12/6<br />
Line 418: Line 427:
 
** [[CSC111 Exercises on Writing Classes| Exercises]] (only last exercise) [[CSC111 Class Exercise Sketch| (What we did in class)]]
 
** [[CSC111 Exercises on Writing Classes| Exercises]] (only last exercise) [[CSC111 Class Exercise Sketch| (What we did in class)]]
 
** [[CSC111 Blinking Light Example| Blinking Light]]: objects that have their own "behavior" and state
 
** [[CSC111 Blinking Light Example| Blinking Light]]: objects that have their own "behavior" and state
** The concept of class ''Inheritance'': [[CSC111 Example of Inheritance: Rectangle with a label| Example]]
 
** '''Dictionaries'''. A hands on introduction can be found [[CSC111_Lab_12_2010 | here]].  And here's an [[CSC111 Counting Frequencies of Occurrence| example for counting the frequency of occurrence of words or letters in a text]]
 
  
 
----
 
----
* [[CSC111 Homework 11 2011| Homework 11]]
 
 
* [[CSC111 Lab 13 2011| Lab 13 ]]
 
* [[CSC111 Lab 13 2011| Lab 13 ]]
 +
* [[CSC111 Homework 11 2011| Homework 11]] and [[CSC111 Homework 11 solution| solution program]]
 +
* A sample of the scenes created for this week's assignment:
 +
[[Image:blinking1.png|150px]][[Image:blinking2.png|150px]][[Image:blinking3.png|150px]]
 
||
 
||
 
* Reading  
 
* Reading  
 
** Inheritance is covered in Section 12.4 of the textbook.
 
** Inheritance is covered in Section 12.4 of the textbook.
 
** Dictionaries are covered in Section 11.6, ''Non-Sequential Collections''
 
** Dictionaries are covered in Section 11.6, ''Non-Sequential Collections''
<!-- ================================================================== -->
+
 
 
|- style="background:#eeeeff" valign="top"
 
|- style="background:#eeeeff" valign="top"
 
| Week 15 <br /> 12/13<br />
 
| Week 15 <br /> 12/13<br />
 
||
 
||
 
* '''Tuesday'''
 
* '''Tuesday'''
** Advanced Topics
+
** Advanced Topic 1: The concept of class ''Inheritance'': [[CSC111 Example of Inheritance: Rectangle with a label| Example]]
<!--
+
** Advanced Topic 2: '''Dictionaries'''. A hands on introduction can be found [[CSC111_Lab_12_2010 | here]].  And here's an [[CSC111 Counting Frequencies of Occurrence| example for counting the frequency of occurrence of words or letters in a text]]
*** Dictionaries
+
*** [[CSC111_Lab_12_2010#Known_Character_Frequencies_for_different_languages | Letter frequencies for various languages]]
*** List comprehension
+
*** Practicing with dictionaries: [[CSC111 How cold is it in England?| How cold is it in England?]]
*** Parsing XML
+
*** [[CSC111 Cold England 2 | Program we did in class]]
-->
 
  
 
* '''Thursday''': <font color="magenta">'''Final Take-Home Exam'''</font>, will be due '''12/22/11 at 4:00 p.m.'''
 
* '''Thursday''': <font color="magenta">'''Final Take-Home Exam'''</font>, will be due '''12/22/11 at 4:00 p.m.'''
 
----
 
----
* [[CSC111 Final Take-Home Exam 2011| Final Exam]]
+
* [[CSC111_Final_Exam_2011| Final Exam]]
 
* [[CSC111 Lab 14 2011| Lab 14 ]]
 
* [[CSC111 Lab 14 2011| Lab 14 ]]
 
||
 
||
Line 485: Line 493:
  
 
==Software==
 
==Software==
 +
 
* Installing and using the [http://www.smith.edu/its/tara/file_transfer/ssh_sftp.html#installing Secure Shell Client] on a Windows PC[http://cs.smith.edu/~thiebaut/classes/111/SecureShell/ .]
 
* Installing and using the [http://www.smith.edu/its/tara/file_transfer/ssh_sftp.html#installing Secure Shell Client] on a Windows PC[http://cs.smith.edu/~thiebaut/classes/111/SecureShell/ .]
 
    
 
    
Line 490: Line 499:
  
 
==Math==
 
==Math==
 +
 
* [[Media:powersOfTwo.pdf | Powers of 2]]
 
* [[Media:powersOfTwo.pdf | Powers of 2]]
 
<br>
 
<br>

Latest revision as of 15:47, 19 January 2015

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




Prof and TAs

Dominique Thiébaut email
Dept. Computer Science
Ford Hall, 356.
Telephone: 3854
Office hours Monday, 2-4 p.m., Tuesday 1-3 p.m., and by appointments

 



To see when and where TAs are available this week, click here.


...


Weekly Schedule

Week Topics Reading


Week 1
9/8
  • Thursday
    • A look at the syllabus
    • Introduction to computer programming
    • Example of a Python program



  • Read Chapter 1 in Zelle.
    • Whenever there are examples in Python, try them out at your computer.
    • Test yourself with the Programming Exercises at the end of the chapter.
  • Read the article on pair programming. We will discuss it in class on Th 9/15.
Week 2
9/13
  • Tuesday
    • 5 minutes with Guido von Rossum



{{#widget:Google Video

docid=-7758421725489622662 width=400 height=326

}}




  • Thursday
    • Quiz (2 questions) on article on pair programming.
    • Overview of Homework #1
    • New tools!
      • Beowulf and Emmy: Linux servers
      • Secure Shell Access (ssh)
      • Emacs: an editor for programmers
    • Syntax and Semantic
    • Exploring functions
      • A function for greeting the user
      • The main function
    • Assignment statement: e.g. a = 3, or a, b = 10, 20
      • what really goes on inside the computer
      • multiple assignments on one line
    • Discussion of article on pair programming.


  • Friday
    • Computer Science lunch. "What we did last summer: CS Majors share their experience of the past summer. Informal gathering with free food, Ford Hall 345, 12:00-1:00 p.m.

  • Reading
    • We're starting on Tuesday with material from Chapter 2. In particular understanding variables and assignments, and the temperature conversion program.


Week 3
9/20



  • Reading
  • On Tuesday we'll cover some material from Sections 2.5 (assignment) and 2.6 (definite loops) in Zele.
Week 4
9/27
  • Tuesday
    • Q&A About current homework
    • Top-Down design Exercise:
      • A detailed look at the approach taken to solve a complex assignment.
      • Debugging techniques (print statements, comments)
    • Some comments about the last homework assignment
      • Solutions posted (BOTW)
      • Header
      • Documentation
      • Wrap long lines



(Advance video to 7-minute point and watch...)

  • Reading:
  • Read Chapter 3 in Zelle on your own. Instead of covering the information of this chapter in a class, we'll visit this information throughout the semester as we progress with Python.
  • Important concepts from Chapter 3:
    • the math functions (abs, round), and
    • the fact that mixing integers and floats always yields a float result.
    • math operators: /, //, % (remainder)


Week 5
10/4
TaxiCabCSC111.png
Blueprint.jpg
    • The concept of classes and objects
    • Encapsulating data and actions in objects


GraphicsCartesianSystem.gif

    • Cartesian system
    • Graphics primitives: GraphWin, Text, Point, Rectangle, Circle, Line.
    • Standard methods: draw(), setWidth(), setFill(), close()
    • Where can I get documentation on all of the Classes and Methods? here!
    • Playing with graphics objects: Demo program (A good place for printing graph paper.)
  • Thursday
    • Handout on classes and methods defined in graphics.py
    • Continuation of exploration of graphics primitives
    • Point, Circle, Line, Rectangle, Text
    • Taxi Example

A submitted solution
  • Reading
    • Chapter 4 on Graphics
Week 6
10/11
  • Tuesday: Fall Break


CalvinDancing.gif

CalvinStudies.jpg


  • Thursday
    • Pixelating George Clooney...
      • A quick word about the RGB color model. Check out this nice video on YouTube as well...
      • The Image( Point, fileName ) objects
      • The color_rgb( ) and getPixel( x, y ) functions
      • Result: we go from


Clooney.gif to ClooneyPixelated.png


  • Reading
Week 7
10/18

Second Half

Week Topics Reading
Week 8
10/25
  • Tuesday
SusanElliott.jpg
  • Welcome to our visitor: Susan S. Elliott, Founder & Chair, SSE, Inc., and author, Across the Divide: Navigating the Digital Revolution as a Woman, Entrepreneur and CEO.
  • Turing and the Turing Test



  • The Loebner Prize
  • And the winner for 2011 is: Rosette
  • Introduction to Rosette, the chatbot/chatterbot.
  • Python
    • loops: Review the break statement, and meet a new statement: continue
    • in as an operator returning true or false: if x in [ 1, 2, 4, 10, 20]: ...
    • Exercises
    • Eliza (demo with emacs: hold shift and hit the escape key. Then type xdoctor and hit return)
  • Want to learn more about chatbots? Check out this page!
  • Wednesday: Presentation of the CS Major, 12:00 p.m., FH241.
  • Thursday
    • building a chatbot similar to Eliza
    • something to start with: get the demo program from Lab 8.
    • introducing randomness in picking answers
    • know how to stop the conversation
    • Detect family members
    • Detect short negative answers
    • reflection
      • reflect "I" into "you", as in "I am bored" becoming "You are bored?"
      • reflect "I" into "you" and "you" into "I": tricky!
    • How can we make Eliza remember past answers from the user?
    • program we developed in class

  • Reading


Week 9
11/1
  • Tuesday
    • A better AI Example: Watson!

    • A note about HW #5: Dealing with multiple objects: Lists and Loops. An example program
    • Slicing strings and lists.
    • Functions returning values. Exercises



  • Reading
    • Slicing of strings is covered in Chapter 5. Slicing of lists works exactly the same way, and is covered in Section 11.2.
    • Functions returning values are covered in Section 6.5.1.
    • Read section 6.6
Week 10
11/8
(The disk is opened around the 4-minute time marker, power up around 5 min 30 sec., and read errors show up around 7 min.)
    • SSD vs. HDD (YouTube video -- go to 2 min 30 sec for dramatic vibration test)
  • Thursday: Otelia Cromwell Day (no labs)
    • Exceptions: try/except. Exercises
    • The While loop: the indefinite loop
      • The syntax and how it works
      • Transforming for-loops in while loops (not very useful, but illustrates well how while loops work)
      • Sentinel loops (looping through numbers, looping through strings)
      • Computation until some quantity reaches some value
      • Making user input robust (keep on asking for something until it is one of the expected values)
      • Infinite loops (while True)
      • Boolean variables
      • Exercises

  • Reading
    • Exceptions: Section 7.4
    • Passing objects: Chapter 6 on Functions
    • Text file processing: Section 5.9
    • While loops: Chapter 8
Week 11
11/15
8queens.png
  • Tuesday
    • A note about the current best 1000 movies homework:
      • make sure program does not crash if input file does not exist
      • Test, test, test! The movie 2001 came out in 1968...
    • Continuation of While Loops.
      • Breaking/Continuing from nested while loops
      • Boolean variables
      • Exercises
  • Thursday
BenFranklin.jpg
    • Breaking out of double loops: break and continue only work with inner loops Example ( and solution programs).
    • Review of good practices for this class
      1. Read the sections in the textbook that cover the material we see in class
      2. Look at the solution programs! There's a reason why they are posted!
      3. Redo the exercises we do in class. Try to come up with the solution on your own.
      4. Remember Benjamin Franklin
    • Exceptions: Difference between NameError and TypeError: http://docs.python.org/library/exceptions.html
    • Top-Down Design: Putting N-Queens on an NxN chessboard. This is the first step of a more complex problem we'll revisit later and which deals with the N-Queens problem.
      • Program we created in class.
      • 1 solution for an 8x8 chessboard: [3, 6, 2, 7, 1, 4, 0, 5]
    • An introduction to Homework 9's two problems:
      • Average presidency: a rehash of an almost-ready solution
      • Elevator to the Stars: revisiting old solutions with a bit of ingenuity (algorithm)

  • Reading
    • Top-Down design rules are covered in Section 9.3
    • Common loop patterns are covered in Section 8.3


Week 12
11/22
AlmostTheTruth.jpg
  • Thursday: Thanksgiving Break

  • Reading


Week 13
11/29
  • Tuesday
TaxiCabCSC111.png
    • Office Hours today: 2:30 p.m. - 5:00 p.m.
    • OOP with Classes!
    • A review and an introduction: review objects, introduce classes.
    • OOP and graphics
    • Programming Example with Classes: A class for a car

(Advance to 2 min 10 sec)

  • Reading
    • Classes are covered in Chapter 10 of the textbook.
Week 14
12/6
  • Tuesday
    • Office Hours today: 2:30 p.m. - 5:00 p.m.
    • Discussion: how to create simple animation based on the fish animation: Look at work by Eadweard Muybridge.

AnimatedDogPhoto.gif


Blinking1.pngBlinking2.pngBlinking3.png

  • Reading
    • Inheritance is covered in Section 12.4 of the textbook.
    • Dictionaries are covered in Section 11.6, Non-Sequential Collections
Week 15
12/13
  • Thursday: Final Take-Home Exam, will be due 12/22/11 at 4:00 p.m.

  • Reading

Links and Resources

Graphics Library

TaxiCabCSC111.png




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

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