CSCI-UA.0002-009

Intro To Computer Programming

Adam Meyers

Undergraduate Division

Computer Science


General Information

Time and Place

Warren Weaver Hall
251 Mercer Street
Room 312
Tuesday and Thursday
8:00—9:15AM

Instructor Contact Info

715 Broadway, Room 702
meyers at cs dot nyu dot edu
212 998 3482
http://nlp.cs.nyu.edu/people/meyers.html

Instructor Office Hours

Monday: 1:30-3PM or Thursday: 10:30-12PM or by appointment

Common Curriculum

http://cs.nyu.edu/courses/spring16/CSCI-UA.0002-003/common_syllabus/

All sections of this class share a common syllabus, including course books, tutoring services, software, etc.  However, I will teach the class in a way that reflects my own teaching style and experience. My background includes the arts, literature, linguistics and natural language processing. So you can expect this class to include aspects of these areas. I last taught this class in the Fall and my lectures and homeworks for that class can be found at: http://cs.nyu.edu/courses/fall15/CSCI-UA.0002-007/. I will use at least some of these same materials for this class. So looking at them should provide you with an idea of what this class will be like (or what will be covered later in the semester).

This website will be updated between now and the beginning of the semester. I expect that it will contain most of the lecture slides for the first few classes before the semester begins.  It will then be continuously updated throughout the semester.

Test Dates

Test

Date


See Tests and Review talks
in Class Schedule for sample
problems, tests, answers and
grading curves

Midterm 1

Thurs Feb 25

Midterm 2

Thurs Apr 7

Final

Tues, May 17 8:00 to 9:50 AM



Self Study and Quizzes: These are elearning modules that are shared across sections of this class including videos, interactive components and quizzes. The page: http://cs.nyu.edu/elearning/CSCI_UA_0002/ provides more details. You will need the class password to view the modules (I will announce this in class. If you forget the password, ask one of the tutors.) The quizzes are available through your NYUClasses account.

Module

Due Date

Link

1

1/28/2016

Variables, Statements, etc.

2

2/2/2016

Types, Operators, Debugging

3

2/9/2016

Boolean Logic, Using Modules

4

2/16/2016

While Loops

5

2/23/2016

For Loops, Nested Loops

6

3/1/2016

Functions

7

3/8/2016

Strings, Sequences, Slicing

8

3/22/2016

Lists

9

4/12/2016

Exceptions, Input/Output

10

4/26/2016

Dictionaries


Reading and Programming Assignments: Read the Gadis book over the course of the semester and do the assigned programming assignments as the term progresses. This section will be continually updated as the term progresses. Grades on these assignments contribute 20% to the final grade for the course. 


Assignment Number

Assignment Description

Due before class on date

Bonus Problems (Optional)

1 Part 1

 hw1.html

Jan 28, 2016


1 Parts 2 and 3

Feb 2, 2016


2 Parts 1 and 2

hw2.html

Feb 9, 2016

hw2-bonus-problems.html

3 Parts 1, 2 and 3

hw3.html

Feb 16, 2016


4 Parts 1 and 2

hw4.html

Feb 23, 2016


4 Part 3

Mar 1, 2016


5 Part 1

hw5.html

Mar 8. 2016

hw5-extra.html

5 Parts 2 and 3

Mar 22, 2016

6

hw6.html

Mar 29, 2016


7 Part 1

hw7.html

April 5, 2016


7 Part 2
April 12, 2016

8 Parts 1, 2 and 3

hw8.html

April 26, 2016


9 Parts 1 and 2

hw9.html

May 3, 2016


10 (Extra Credit Only)

hw10.html

May 9, 2016


General Guidelines for Programming Assignments

  1. Put almost all statements inside of function definitions. The following exceptions are OK:

  2. Give reasonably self-explanatory names to all functions, variables and files

  3. If you name the file containing a program appropriately, e.g., 'bingo_program.py', it is normal to name the main function of the file "main", but a name like "bingo_program" is OK also.

  4. Make it clear to the grader how to run your program, e.g., include instructions in comments or make it so your program executes when the file is loaded, e.g., adding a statement like main() at the bottom of the file.

  5. Make sure your program runs without bombing before sending it to the grader.

  6. If you can only partially complete the assignment, you should seek help from the tutoring staff and/or the professor.  The main point of the homework is to learn the material. Learning how to do the assignments well will also really help you do well on the midterms and final.

  7. It is a good idea to start your homework during the Lab classes (about 40% of the scheduled classes). The purpose of these classes is to help you do the homework assignments well.

Class Schedule, Lecture Slides and other Materials from Class Attached:

This table will be continuously updated during the semester. Documents will be updated; errors will be corrected and additional material will be added. All materials originated by me will be freely-downloadable from this site. Proprietary material will be distributed using links to NYUClasses and will require an NYUClasses login to access.


Class

Date

Slides (.pdf)

Program files (.py) and Idle Screen Dumps (.txt)

1

Tues Jan 26

Introduction Talk: Administrative Matters
Introduction Talk: With a Focus on Algorithms and Code Writing
* Introduction Talk: How Computers Work
* This talk contains proprietary material and requires NYUClasses to access.

idle dump -- trace of code written in class

2

Thurs Jan 28

idle dump
sample python functions written in class

3

Tues Feb 2

Print Statements and Data Types
Planning a Complex Program: Day in the Future Problem

idle dump

sample in-class programs

code for day in the future problem

4

Thurs Feb 4

Lab Class (Homework 2: exercises with print)


5

Tues Feb 9

Flow of Control

Goldilocks Program
Expert System: Cold or Flu?

code/pseudocode for day in the future problem

sample in class programs (Feb 9)
idle dump (Feb 9)

6

Thurs Feb 11

Lab Class (Homework 3: decision tree programs)

7

Tues Feb 16

Loops

loop examples
idle dump (2/16)

hour_class_or_diamond_program
(completed after class)
idle dump (2/18)

8

Thurs Feb 18

Lab Class (Homework 4: Loops)

9

Tues Feb 23

Midterm Review
Sample Midterm

python file with answers to sample midterm

10

Thurs Feb 25

Midterm 1


11

Tues Mar 1

Modules, Scripts, and Graphics

four-squares program
checkerboard program
turtle-dog program
idle dump

12

Thurs Mar 3

Lab Class: Graphics


13

Tues Mar 8

Post Midterm Review (and more Modules, Scripts and Graphics)

midterm

midterm answers

14

Thurs Mar 10

Lab Class: Post-Midterm Review and More Graphics


15

Tues Mar 22

Sequences

number_program_input.py
example-string-functions.py
morphology.py
009_string_progs.py
idle dump

16

Thurs Mar 24

Lab Class


17

Tues Mar 29

Sequences Part 2

turtle-dog program
dog_instructions.py
tic_tac_toe.py
homework_sort.py
idle dump

18

Thurs Mar 31

Lab Class


19

Tues Apr 5

Review for Midterm 2

practice midterm
practice midterm answers

old midterm
old midterm answers

20

Thurs Apr 7

Midterm 2


21

Tues Apr 12

Input and Output to/from files

Exception Handling

IO-examples.py
exception_examples.py
phone_list.txt
sample_mail.zip (extract files before using)
short_story.txt
idle dump (Apr12)
IO-Lab.pdf
post_midterm2_review.pdf
midterm2-version1.pdf  (test)
midterm2-version1.py (answers)
idle dump (Apr19)

22

Thurs Apr 14

Lab Class: Midterm Review and Homework 8

23

Tues Apr 19

Midterm 2 Review and Continuation of File Input/Output and Exceptions

24

Thurs Apr 21

Lab Class: Midterm Review and Homework 8

25

Tues Apr 26

Dictionaries_and_Sets

random_sentence3.py
words3.py (loaded by random sentence program)
movie_rating_program.py
movies.tsv (sample input/output for movie program)
idle dump (Apr26)
phone book program started in class
sample phone number tsv file

26

Thurs Apr 28

Lab Class


27

Tues May 3

Recursion

recursion-functions.py
british-royal.txt (input file)
minimal_hanoi.py (Python's demo program)
idle dump (May 3)
in-class recursive python exercise (compound interest)

28

Thurs May 5

Review for Final Exam

Practice Final
Practice Final Answers


Tues May 17

Final Exam