[ news | information | syllabus | labs | links ]

Introduction to Computer Science in Python (CSCI 051p)

Lectures: MWF10-10:50 in Edmunds 114
Lab: F 1:15-4 in Edmunds 219 and 229

Instructors: Eleanor Birrell and Yi Chen

TAs: Paul Mesa (head TA), Roei Cohen, Nirali Devgan, Gabe Magee, Jared Mejia, Ruben Pacheco-Caldera, Hannah Shoemaker, and Cassie Wang


News

We will be using piazza for posting information (including the weekly labs and assignments) and for answering questions, so please make sure you're signed up for this class on piazza.

Information

Computer Science 051p is an introduction to the field of computer science using the Python programming language. We will cover topics including iteration and recursion, basic data structures, sorting and searching, elementary analysis of algorithms, and an introduction to object-oriented programming. There will be a special emphasis on working with and making sense of data in order to connect course material with applications in other disciplines.

By the end of this course we hope you have a good basic understanding of how to develop (design, code, and debug) medium-sized programs in Python, and have a basic understanding of how one might analyze programs for correctness and efficiency.

This course (or one of the other variations of CSCI 051) is a prerequisite for all upper level Computer Science courses. In this course we do not assume that you have had any previous computer programming experience in any language. If you have had significant previous experience, please come talk to one of the instructors as cs54 may be more appropriate. There is no absolutely required textbook for this class. However, you may find the following resource(s) helpful:

  • Think Python, 2nd edition by Allen Downey. The pdf is freely available.
  • Some of the materials used in this class are inspired by materials created by other people for various other classes (including CS30 at Pomona).

    Syllabus

    Any topics or assignments that are listed for dates in the future should be taken as (potentially very) tentative. Anything for a date at least 2 days in the past will accurately reflect what actually happened in the class.

    Any lecture notes, demonstration code, or worksheets will be posted on piazza.

    The readings refer to the book "Think Python" and will be most useful if done before that day's lecture.

    Week Date In class Readings for class Assignments due
    1 (Wed) 1/23 introduction
    python basics, values, types
    Ch 1-2
    (Fri) 1/25 variables, operators Ch 2
    (Lab) 1/25 lab 1 - introduction to pycharm, python
    2 (Mon) 1/28 operators, booleans, conditionals Ch 5 assignment 1 due 11PM
    (Wed) 1/30 conditionals Ch 5
    (Fri) 2/1 coding style, functions, return values Ch 3
    (Lab) 2/1 lab 2 - conditionals
    3 (Mon) 2/4 functions, parameters, arguments Ch 3 assignment 2 due 11PM
    (Wed) 2/6 functions, parameters, arguments Ch 3
    (Fri) 2/8 scope, modules Ch 3
    (Lab) 2/8 lab 3 - functions, operators
    4 (Mon) 2/11 functions assignment 3 due
    (Wed) 2/13 while loops, for loops, range() Ch 4, 5
    (Fri) 2/15 turtle graphics Ch 4
    (Lab) 2/15 lab 4 - loops, graphics
    5 (Mon) 2/18 recursion Ch 5, 6 assignment 4 due 11PM
    (Wed) 2/20 recursion Ch 5, 6
    (Fri) 2/22 recursion without graphics Ch 6
    (Lab) 2/22 lab 5 - recursion
    6 (Mon) 2/25 * checkpoint 1 * assignment 5 due 11PM
    (Wed) 2/27 strings, files Ch 8, 9
    (Fri) 3/1 strings, files Ch 8, 9
    (Lab) 3/1 lab 6 - strings
    7 (Mon) 3/4 files, exceptions assignment 6 due 11pm
    (Wed) 3/6 review
    (Fri) 3/8 object-oriented programming Ch 16, 17
    (Lab) 3/8 * checkpoint 2 - programming *
    8 (Mon) 3/11 object-oriented programming Ch 16, 17
    (Wed) 3/13 object-oriented programming Ch 16, 17
    (Fri) 3/15 object-oriented programming Ch 16, 17
    (Lab) 3/15 lab 7 - object-oriented programming
    (Mon) 3/11 Spring Break, no class
    (Wed) 3/20
    (Fri) 3//22
    9 (Mon) 3/25 recap, lists Ch 10 assignment 7 due 11pm
    (Wed) 3/27 lists Ch 10
    (Fri) 3/29 Cesar Chavez Day, no class
    (Lab) 3/29
    10 (Mon) 4/1 lists Ch 10
    (Wed) 4/3 lists Ch 10
    (Fri) 4/5 nested lists Ch 10
    (Lab) 4/5 lab 8 - lists
    11 (Mon) 4/8 nested lists assignment 8 due 11PM
    (Wed) 4/10 deep/shallow copy, ==, is Ch 10
    (Fri) 4/12 * checkpoint 3 *
    (Lab) 4/12 lab 9 - nested lists
    12 (Mon) 4/15 dictionariesCh 11 assignment 9 due 11pm
    (Wed) 4/17 dictionariesCh 11
    (Fri) 4/19 dictionaries, plotting Ch 11, pyplot tutorial
    (Lab) 4/19 lab 10 - dictionaries, plotting
    13 (Mon) 4/22 algorithms, sorting assignment 10 due 11pm
    (Wed) 4/24 sorting, asymptotics
    (Fri) 4/26 mergesort, binary/linear search
    (Lab) 4/26 lab 11 - algorithms
    14 (Mon) 4/29 client-server architecture, intro to html, resources assignment 11 due 11pm
    (Wed) 5/1 web scraping
    (Fri) 5/3 web scraping, html, css
    (Lab) 5/3 work on final program
    15 (Mon) 5/6 javascript
    (Wed) 5/8 javascript final program due 4PM

    The final exam will be on Thursday 5/16 from 9am-noon in Edmunds 114.

    Grade distribution

    Final grades will be determined by grades on labs, test programs, the midterm, and the final.

    WorkProportion
    Labs and Assignments40%
    Final Programming Project20%
    Checkpoints24%
    Final exam16%

    Links

    The following links may be helpful (let me know if you find anything that you feel should be included!) :

  • Think Python, 2e: this is the webpage for our textbook. You can download the pdf, get the html, and order a hardcopy from this website. Make sure you're looking at the 2nd edition!
  • PyCharm: this is the webpage for the IDE that we're using. You can download a copy of the Community Edition of PyCharm here. The version on the lab machines is 2017.3.2
  • python.org: this is the main page for all things python. You can download python 3 (make sure you download python 3 and not python 2!), find documentation, and even some tutorials.
  • How to Think Like a Computer Scientist: Interactive Edition
  • CodingBat Python

  • "Computers do not solve problems, they execute solutions"
    --Laurent Gasser