CSCI-UA.0002-004

Intro To Computer Programming

Adam Meyers

Undergraduate Division

Computer Science


General Information

Time and Place

Warren Weaver Hall
251 Mercer Street
Room 102
Mondays and Wednesday
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

Mon Feb 29

Midterm 2

Wed Apr 11

Final

Mon May 16 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/21016

Variables, Statements, etc.

2

2/1/2016

Types, Operators, Debugging

3

2/8/2016

Boolean Logic, Using Modules

4

2/15/2016

While Loops

5

2/24/2016

For Loops, Nested Loops

6

3/2/2016

Functions

7

3/9/2016

Strings, Sequences, Slicing

8

3/23/2016

Lists

9

4/13/2016

Exceptions, Input/Output

10

4/27/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 1, 2016


2 Parts 1 and 2

hw2.html

Feb 8, 2016

hw2-bonus-problems.html

3 Parts 1, 2 and 3

hw3.html

Feb 15, 2016


4 Parts 1 and 2

hw4.html

Feb 24, 2016


4 Part 3

Mar 2, 2016


5 Part 1

hw5.html

Mar 9, 2016

hw5-extra.html

5 Parts 2 and 3

Mar 23, 2016

6

hw6.html

Mar 30, 2016


7 Part 1

hw7.html

Apr 6, 2016


7 Part 2
Apr 13, 2016

8 Parts 1, 2 and 3

hw8.html

Apr 27, 2016


9 Parts 1 and 2

hw9.html

May 4, 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

Mon Jan 25

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

Wed Jan 27

idle dump (for 1/27/16)

sample python .py file written in class

3

Mon Feb 1

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

idle dump

sample in-class programs

code/pseudo-code for day in the future problem

4

Wed Feb 3

Lab Class (Homework 2: exercises with print)


5

Mon Feb 8

Flow of Control

Goldilocks Program
Expert System: Cold or Flu?

code/pseudo-code for day in the future problem

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


Wed Feb 10

Lab Class (Homework 3: decision trees)

7

Wed Feb 17

Loops

loop examples
idle dump

8

Mon Feb 22

Lab Class (Homework 4: Loops)

hour_class_or_diamond_program
idle dump

9

Wed Feb 24

Midterm Review
Sample Midterm

python file with answers to sample midterm

10

Mon Feb 29

Midterm 1


11

Wed Mar 2

Modules, Scripts, and Graphics

four-squares program
checkerboard program
turtle-dog program

12

Mon Mar 7

Lab Class: Graphics


13

Wed Mar 9

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

midterm

midterm answers

14

Mon Mar 21

Lab Class: Post-Midterm Review and More Graphics


15

Wed Mar 23

Sequences

number_program_input.py
example-string-functions.py
morphology.py
idle dump
004_upper_lower.py

16

Mon Mar 28

Lab Class


17

Wed Mar 30

Sequences Part 2

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

18

Mon Apr 4

Lab Class


19

Wed Apr 6

Review for Midterm 2

practice midterm
practice midterm answers
old midterm
old midterm answers

20

Mon Apr 11

Midterm 2


21

Wed Apr 13

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 (Apr13)
IO-Lab.pdf

post_midterm2_review.pdf
midterm2-version2.pdf  (test)
midterm2-version2.py (answers)

22

Mon Apr 18

Lab Class: Midterm Review and Homework 8

23

Wed Apr 20

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

24

Mon Apr 25

Lab Class: Midterm Review and Homework 8

25

Wed Apr 27

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 (Apr27)
phone book program started in class
sample phone number tsv file

26

Mon May 2

Lab Class


27

Wed May 4

Recursion

recursion-functions.py
british-royal.txt (input file)
minimal_hanoi.py (Python's demo program)
idle dump (May 4)
in-class recursive python exercises (compound interest and find highest number)

28

Mon May 9

Review for Final Exam

Practice Final
Practice Final Answers


Mon May 16, 8:00-9:50

Final Exam