[ news | information | syllabus | labs | links ]

Introduction to Computer Science in Python (CSCI 051p)

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

Instructor: Yi Chen

TAs: Sebastian Cevallos (head TA), Camilla Guo, Henry Jacobs, Gabe Magee, Paul Mesa, Juan Zamudio


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 me as cs52 or cs54 may be more appropriate. The required textbook for the class is Think Python, 2nd edition by Allen Downey. The pdf is freely available. However, if you prefer having a physical copy as well, we've also placed an order for the book at Huntley bookstore.

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.

Lecture notes (if any) will be posted on piazza.

The readings are to be done for that day's lecture.

Week Date In class Readings for class Assignments due
1 (Wed) 1/17 introduction
python basics, values, types
Ch 1-2
(Lab) 1/18 lab 1 - introduction to pycharm, python lab 1 due 4pm
(Fri) 1/19 variables, operators Ch 2
2 (Mon) 1/22 operators, coding style, functions Ch 3 assignment 1 due 11PM
(Wed) 1/24 functions, parameters, arguments Ch 3
(Lab) 1/25 lab 2 - functions, operators lab 2 due 4pm
(Fri) 1/26 functions, return values Ch 3
3 (Mon) 1/29 scope, modules Ch 3 assignment 2 due 11PM
(Wed) 1/31 booleans, conditionals Ch 5
(Lab) 2/1 lab 3 - functions, conditionals lab 3 due 4pm
(Fri) 2/2 conditionals, review Ch 5
4 (Mon) 2/5 * checkpoint 1 *
(Wed) 2/7 conditionals, loops, turtle graphics Ch 4, 5
(Lab) 2/8 lab 4 - loops, graphics lab 4 due 4pm
(Fri) 2/9 turtle graphics, recursion Ch 4
5 (Mon) 2/12 *** no class *** assignment 3 due 11PM
(Wed) 2/14 recursion Ch 5, 6
(Lab) 2/15 lab 5 - recursion lab 5 due 4pm
(Fri) 2/16 recursion Ch 5, 6
6 (Mon) 2/19 recursion without graphics
range(), strings
Ch 6, 8 assignment 4 due 11PM
(Wed) 2/21 strings, files Ch 8, 9
(Lab) 2/22 lab 6 - strings lab 6 due 4pm
(Fri) 2/23 strings, files Ch 8, 9
7 (Mon) 2/26 lists, review Ch 10 assignment 5 due 11pm
(Wed) 2/28 * checkpoint 2 *
(Lab) 3/1 lab 7 - files, lists lab 7 due 4pm
(Fri) 3/2 data structures, lists Ch 10
8 (Mon) 3/5 lists Ch 10 assignment 6 due
(Wed) 3/7 lists Ch 10
(Lab) 3/8 * programming checkpoint *
(Fri) 3/9 lists, shallow/deep copy Ch 10
(Mon) 3/12
*** No class - spring break ***
(Wed) 3/14
*** No class - spring break ***
(Fri) 3/16
*** No class - spring break ***
9 (Mon) 3/19 lists Ch 10
(Wed) 3/21 exceptions, dictionaries Ch 11, 14
(Lab) 3/22 lab 8 - nested lists lab 8 due 4pm
(Fri) 3/23 dictionaries, tuples Ch 11, 12
10 (Mon) 3/26 dictionariesCh 11 assignment 7 due 11pm
(Wed) 3/28 plotting pyplot tutorial
(Lab) 3/29 lab 9 - dictionaries, plotting lab 9 due 4pm
(Fri) 3/30
*** No class - Cesar Chavez day ***
11 (Mon) 4/2 object-oriented programmingCh 16, 17 assignment 8 due 11PM
(Wed) 4/4 object-oriented programming Ch 16, 17
(Lab) 4/5 lab 10 - oop lab 10 due 4pm
(Fri) 4/6 object-oriented programming Ch 16, 17
12 (Mon) 4/9 review assignment 9 due 11PM
(Wed) 4/11 * checkpoint 3 *
(Lab) 4/12 discussion of final program
(Fri) 4/13 inheritance Ch 18
13 (Mon) 4/16 sorting algorithms, selection sort
(Wed) 4/18 insertion sort, linear/binary search
(Lab) 4/19 lab 11 - algorithms lab 11 due 4pm
(Fri) 4/20 mergesort, browsers and servers
14 (Mon) 4/23 resources, intro to html assignment 11 due 11pm
(Wed) 4/25 beautifulsoup
(Lab) 4/26 work on final program
(Fri) 4/27 review
15 (Mon) 4/30 review
(Wed) 5/2 review, wrap-up final program due 4PM

The final exam will be on Tuesday 5/8 from 9am-noon.

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