This course presents an overview of computer science (CS) with an emphasis on problem-solving and computational thinking through 'coding': computer programming for beginners. Other topics include: organization of hardware, software, and how information is structured on contemporary computing devices. This course is pre-requisite to several introductory core courses in the CS Major. The course is also required for the CS minor. MATH 12500 or higher is strongly recommended as a co-req for intended Majors.

Course Designers:

Course Instructors:

COURSE STRUCTURE:

Each week we have:


This is a HYBRID course which means that, in place of a second weekly meeting, you are responsible for independently reading the weekly Lab found in the "Handouts" column in the Course Outline below.
Starting on September 11, there are programming assignments due at 6pm every day. Programming Assignments are directly related to Labs and Lectures.
Lecture notes will also be posted weekly in the "Handouts" column in Course Outline below.

No late assignment will be accepted. Submission is open at least 2 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:

Click here to make a tutoring appointment!

Useful Links:

Course Outline:

 Week:                       Topics: Handouts: Quiz & Code Review: Reading:
#1 Lecture:
August 29
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
Monday, September 04 Labor Day. College Closed -- No Tutoring/Quizzes/Code Reviews available.
#2 Lecture:
September 5
Strings & Lists: looping through strings, console I/O, ASCII representation

for-loop examples,
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
#3 Lecture:
September 12
Arithmetic; Indexing & Slicing; Colors, Hexadecimal notation;

Slicing Challenges,
Color Challenges,
Lecture Notes
Think CS: Section 8.11 & Chapter 11,
Numpy tutorial (DataCamp)
Lab, Quiz & Code Review: Arrays and images in numpy, hexadecimal representation of colors (image processing)

Lab 3

Strings, Loops and Unix
Friday, September
15
Rosh Hashanah. College Closed -- No Tutoring/Quizzes/Code Reviews available.
#4 Lecture:
September 19
More on Lists & Arrays; Images; Decisions;

Lecture Notes Think CS: Chapter 7 & Chapter 11
Lab, Quiz & Code Review: Programming with decisions & files (flood maps)

Lab 4

Colors, Hex, and Unix
Monday, September 25 Yom Kippur. College Closed -- No Tutoring/Quizzes/Code Reviews available.
#5 Lecture:
September 26
Logical Expressions, Circuits, Binary Numbers;

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

Images and Decisions
#6 Lecture:
October 03
Cropping images; Accessing formatted data;

Stars data example,
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
Monday, October
09
Columbus Day. College Closed -- No Tutoring/Quizzes/Code Reviews available.
Tuesday, October
10
Classes follow a Monday schedule. No Lecture -- Lab open normal hours.
#7 Lecture:
October 17
Functions; NYC OpenData; Jam (Python Tutor),
Lecture slip examples,
Lecture Notes
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

Using the pandas library
#8 Lecture:
October 24
More Functions & Parameters;

Lecture 8 programs,
List Example 1 (Python Tutor)
List Example 2 (Python Tutor),
Lecture Notes
Think CS: Chapter 6
Lab, Quiz & Code Review: Binning data (parking tickets); Top-down design (herd of turtles);

Lab 8

Review of Labs 1-7
#9 Lecture:
October 31
Programming with Functions, Top-down Design;
Mapping GIS Data (Folium);
Random Number Generation;
Indefinite Loops

Sisters Example,
num2string example,
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

Top-down design, value_counts
#10 Lecture:
November 7
Indefinite Loops; Simulations;
Design Patterns: Max;
cunyLocations.csv,
CUNY Campuses Map,
Swap if smaller (Python Tutor),
Random Search (turtles), Lecture Notes
Think CS: Chapter 8
Lab, Quiz & Code Review: Indefinite loops; random;
More on command line scripts;

Lab 10

Folium & regular expressions
#11 Lecture:
November 14
Python Recap;
Simplified Machine Language;
Design Patterns: Searching;

WeMIPS Emulator,
Lecture slip example,
Lecture Notes
U Idaho reference sheet, MIPS Wikibooks
Lab, Quiz & Code Review: WeMIPS

Lab 11

Random numbers & while-loops
#12 Lecture:
November 21
Introduction to C++: program structure, data representation and I/O.

Final Exam Overview

cin/cout example,
kg/lbs example,
loops example,
nested loops,
Lecture Notes
Cplusplus Tutorial,
C++ Tutorials Point,
The Rook's Guide to C++
Lab, Quiz & Code Review: C++ Intro

Lab 12

WeMIPS (Machine Language)
Wednesday, November 22 Thanksgiving Break -- No Tutoring/Quizzes/Code Reviews available.
Thursday, November 23 Thanksgiving Break -- No Tutoring/Quizzes/Code Reviews available.
Friday, November
24
Thanksgiving Break -- No Tutoring/Quizzes/Code Reviews available.
#13 Lecture:
November 28
C++

Lecture 13 programs,
Lecture Notes
Cplusplus Tutorial,
C++ Tutorials Point,
The Rook's Guide to C++
Lab, Quiz & Code Review: C++

Lab 13

C++
#14 Lecture:
December 05
MOCK EXAM

LAST DAY OF CLASS
Tuesday, December
12
Reading Day -- No Tutoring available.
Wednesday, December 13 Reading Day -- No Tutoring available.
MONDAY DEC 18 9 AM TO 11 AM FINAL EXAM

Assembly Hall (118 HN) FINAL EXAM INFORMATION
(This file was last modified on 26 September 2023.)