Course Designers:
Course Instructors:
COURSE STRUCTURE:
Each week we have:
No late assignment will be accepted.
Submission is open 3 weeks before the due date.
You should work on programming assignment well ahead of the due dates.
Working on assignments the day they are due will increase the chance you will miss the deadline.
Help: Peer-Mentor Tutoring. Undergraduate Teaching Assistants (UTAs) are available to help:
Week: | Topics: | Handouts: | Quiz & Code Review: | Reading: | ||
---|---|---|---|---|---|---|
#1 | Lecture: January 31 |
Syllabus & Class Policies, Introductions, Introduction to Python: definite loops, simple output, primitive data types, overview of objects & modules; What is an algorithm? |
Syllabus, Programming Assignments, Hello, World, Hexagon example, Fancier hexagon, Lecture Notes |
Think CS: Chapter 1 & Chapter 4 | ||
Lab, Quiz & Code Review: | Getting started with Python & IDLE; Using modules and definite loops | Lab 1 |
Academic Integrity + Introductory survey | |||
#2 | Lecture: February 7 |
Strings & Lists: looping through strings, console I/O, ASCII representation |
Loop Puzzle 1, Loop Puzzles 2, Caesar Cipher example, input() example, Lecture Notes |
Think CS: Chapter 2 & Chapter 3 | ||
Lab, Quiz & Code Review: | String methods; Problem solving and the design process (simple parsing and translating) | Lab 2 |
Turtles & Loops | |||
Monday, February 13 | College closed. Lab closed. No tutoring. | |||||
#3 | Lecture: February 14 |
Arithmetic; Indexing & Slicing; Colors, Hexadecimal notation; |
Event Timing (Arithmetic Challenge),
Slicing Challenges, Color Challenges, Lecture Notes | Think CS: Section 8.11 &
Chapter 11, Numpy tutorial (DataCamp) |
||
Lab Quiz& Code Review & Code Review: |
Arrays and images in numpy, hexadecimal representation of colors (image processing) | Lab 3 |
Strings, Loops & Shell Commands | |||
Monday, February 20 | College closed. Lab closed. No tutoring. | |||||
Tuesday, February 21 | Follow Monday's schedule. No class. Lab open. | |||||
#4 | Lecture: February 28 |
More on Lists & Arrays; Images; Decisions; |
Decision Challenges, turtleString.py, csBridge.png, blue_bridge_incomplete.py, blue_bridge_complete.py, red_cyan_incomplete.py, red_cyan_complete.py, H_logo_incomplete.py, H_logo.py, vertical_red_blue_strips_incomplete.py, vertical_red_blue_strips.py, grade.py, Lecture notes |
Think CS: Chapter 7 & Chapter 11 | ||
Lab, Quiz & Code Review | Programming with decisions & files (flood maps) | Lab 4 |
Indexing, Slicing, Colors & Shell Commands | |||
#5 | Lecture: March 7 |
Logical Expressions, Circuits, Binary Numbers; |
Types & Decisions Challenges, Logical Operators Challenges, SemesterIfAndExample, Basic Gates, Circuit Challenge1, Circuit Challenge2, Lecture notes |
Think CS: Chapter 7, Burch's Logic & Circuits, Explain Logic Gates |
||
Lab, Quiz & Code Review: | More on Decisions (snow pack); Circuits & Logical Expressions |
Lab 5 |
Loops, Decision, Numpy Arrays & Shell Commands | #6 | Lecture: March 14 |
Accessing formatted data; | Arithmetic Challenges, List/String Challenges, Stars Analysis, Lecture notes |
Think CS: Chapter 6, 10-minutes to Pandas Tutorial, DataCamp Pandas Tutorial, Ubuntu Terminal Reference Sheet |
Lab, Quiz & Code Review: | CSV files via pandas (population change); Shell Scripts, github |
Lab 6 |
Circuits, Logical Expressions & Shell Commands | |||
#7 | Lecture: March 21 |
Functions; NYC OpenData |
quarterImage.py, Hello with main(), Total & Tax Challenge, Greet Example, Happy Example, Jam Example, Month String Example, NYC OpenData student_info.csv, data file to describe students, including name, age, gender, grade level, and score. groupby_Age.py, group students by age groupby_GradeLevel.py, group students by grade level (freshman, sophomore, junior, senior) student_analysis.py, get information on students' ages, scores, and group by gender. monthString.py, define a function to convert an integer in 1-12 to the name of the corresponding month. Use nested if-else statements. monthString2.py, define a function to convert an integer in 1-12 to the name of the corresponding month. Use if-else statement and match a subscript to an item in a list of names. film_permits_analysis.py, analysis which parking slots or boroughs are the most popular from data file Film_Permits.csv five_color_image.py, cutting a rectangle into top left, bottom left, top right and bottom right areas and use different colors for different areas. stars_analysis.py, read and get maximum luminosity, minimum temperature, and average radius of hypergiant from stars.csv. Lecture notes |
Think CS: Chapter 6, 10-minutes to Pandas Tutorial, DataCamp Pandas Tutorial |
||
Lab, Quiz & Code Review | OpenData NYC (shelter data); Using main() functions; Python from the command line |
Lab 7 |
Formatted Data & Shell Commands | |||
#8 | Lecture: March 28 |
More Functions & Parameters; |
Decisions & Functions Example, Dessert Exam Questions, Foo example, Koalas, Lecture notes |
Think CS: Chapter 6 | ||
Lab, Quiz & Code Review: | Binning data (parking tickets); Top-down design (herd of turtles); Command line git |
Lab 8 |
Functions | |||
#9 | Lecture: April 4 |
Programming with Functions, Top-down Design; Mapping GIS Data (Folium); Random Number Generation; Preview: Indefinite Loops |
Sisters Example, numsConvert.py num2string example, CUNYcampuses, Distance Check, Random Walk, Lecture notes |
Think CS: Chapter 6, folium tutorial |
||
Lab, Quiz & Code Review |
Folium/leaflet.js (mapping CUNY locations);
Finding errors; Regular expressions (command line) |
Lab 9 |
Parameters & Functions | |||
Wednesday, April 5 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
Thursday, April 6 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
Friday, April 7 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
Monday, April 10 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
Tuesday, April 11 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
Wednesday, April 12 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
Thursday, April 13 | Spring Recess. No class scheduled. Lab closed. No Tutoring | |||||
#10 | Lecture: April 18 |
Indefinite Loops; Simulations; Design Patterns: Max; |
Nums & While, Max Num, Random Search (turtles), maximum.py, initialize the current maximum to be zero, might not work if all elements are negative maximum2.py, initialize the current maximum to be -sys.maxsize-1 maximum3.py, if a given list is empty, prompt no maximum element in an empty list and exit, otherwise, initialize the current maximum to be the first element of a list maximum4.py. Define a function, for a given list, if it is empty, return 'nan' (not a number), otherwise return its maximum. go_center.py, a turtle moves randomly until goes in the square with 50 pixels length centered at the origin. cunyLocations.py, create a map with CUNY campus. cunyLocations.csv. Describe information such as institution types, campus(aka name), latitude, longitude of CUNY campus. Lecture notes |
Think CS: Chapter 8 | ||
Lab, Quiz & Code Review | More on Indefinite loops; Writing functions; unit testing | Lab 10 |
Functions, Top-down Design & Shell Commands | |||
#11 | Lecture: April 25 |
Python Recap; Simplified Machine Language; Design Patterns: Searching; |
Search, WeMIPS Emulator, Lecture notes |
U Idaho reference sheet, MIPS Wikibooks | ||
Lab, Quiz & Code Review | Simplified machine language | Lab 11 |
Indefinite Loops, Simulations & Shell Commands | |||
#12 | Lecture: May 2 |
Introduction to C++: program structure, data representation and I/O. Final Exam Overview |
cin/cout example, convert example, loops example, growth example, nested loops, Lecture notes, video of Introduction to C++ |
Cplusplus Tutorial, C++ Tutorials Point, The Rook's Guide to C++ |
||
Lab, Quiz & Code Review | Using gcc | Lab 12 |
Simplified Machine Language & Shell Commands | |||
#13 | Lecture: May 9 |
C++ control structures |
Decision example (C++), Logical Expressions (C++), Input Checking (C++), Input Checking, II (C++), Growth Example (C++), Lecture notes |
Cplusplus Tutorial, C++ Tutorials Point, The Rook's Guide to C++ |
||
Lab, Quiz & Code Review | Control Structures in C++ | Lab 13 |
C++ & Shell Commands | #14 | Lecture: May 16 |
Mock Exam |
May 17-19 | No tutoring available | |||||
May 22, Monday 9am-11am |
Final Exam | Final Exam Information |