BRONX COMMUNITY COLLEGE
of the City of New York
DEPARTMENT OF MATHEMATICS AND COMPUTER SCIENCE


SYLLABUS: CSI 31 Introduction to Computer Programming I       3 credits, 4 hours

PREREQUISITES: CSI 30 and ENG 02 and RDL 02 if required

COREQUISITE: MTH 31


TEXT: Python Programming: An Introduction to Computer Science,by John Zelle, Franklin, Beedle & Associates, 2004. ISBN 1-887902-99-6

Goals of the course:

CSI 31 introduces students to programming design and implementation. In this course students will learn basic programming style and techniques in keeping with modem programming philosophy.

Objectives:By the end of this course the successful student will be able to:

  1. Identify the basic design of a computer system;
  2. Describe some of the topics and techniques of computer science;
  3. Design an algorithm to solve a given problem using the top-down design approach;
  4. Translate that algorithm into a computer program;
  5. Demonstrate understanding of the concept of data type;
  6. Write functions to solve problems, and understand the notion of procedural abstraction;
  7. Understand and use the three basic programming structures: sequential execution, decision structures, and repetition (loops);
  8. Use files for input and output,
  9. Use objects, including the objects of a graphics library, and
  10. Use strings and lists to manipulate data.

Students will complete 8 to 10 programming projects selected from the list of suggested programming exercises or comparable projects developed by the instructor.

Sections and Topics


Chapter 1
Computers and Programs (2 classes)


1.1 The Universal Machine

1.6 The Magic of Python

1.2 Program Power

1.7 Inside a Python program

1.3 What is Computer Science?

1.8 Chaos and Computers

1.4 Hardware Basics

1.9 Chapter Summary

1.5 Programming Languages


Suggested Review Questions

1.10 Exercises

p.20: True/False: all
p.20-21: Multiple Choice: all
p.21-22: Discussion: all

Suggested Programming Exercises

p. 22-23; 1, 2, 3, 4, 5

Chapter 2
Writing Simple Programs (3 classes)


2.1 The Software Development Process

2.5 Assignment statements

2.2 Example programs

2.6 Definite Loops

2.3 Elements of Programs: names, expressions

2.7 Example program: future value

2.4 Output Statements

2.8 Chapter summary

SuggestedReview Questions

2.9 Exercises

p.46-47: True/false: all
p.47-48: Multiple choice: all
p. 48-49: Discussion: all

SuggestedProgramming Exercises

p.49-50: 1, 2, 3, 4, 5, 7, 8, 9

Chapter 3
Computing with Numbers (2 classes)


3.1 Numeric data types

3.5 Handling large numbers: Long Ints

3.2 Using the Math library

3.6 Type conversions

3.3 Accumulating results: factorial

3.7 Chapter Summary

3.4 The limits of Int


Suggested Review Questions

3.8 Exercises

p. 69-70: True/false: all
p. 70-71: Multiple choice: all
p. 71-72: Discussion: all

Suggested Programming Exercises

p. 72-73: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16

Chapter 4
Computing with Strings (3 classes)


4.1 The string data type

4.5 Input/output as string manipulation

4.2 Simple string processing

4.6 File processing

4.3 Strings, lists and sequences

4.7 Chapter Summary

4.4 Strings and secret codes


Suggested Review Questions

4.8 Exercises

p. 115: True/false: all
p. 115-116: Multiple choice: all
p. 116-118: Discussion: all

Suggested Programming Exercises

p. 118-120: 1, 2, 3, 4, 5, 9, 10, 1112, 13, 14, 15

Chapter 5
Objects and Graphics (2 classes)


5.1 Overview

5.6 Choosing coordinates

5.2 The object of objects

5.7 Interactive graphics

5.3 Simple graphical programming

5.8 Graphics Module reference

5.4 Using graphical objects

5.9 Chapter Summary

5.5 Graphing future value


Suggested Review Questions

5.10 Exercises

p. 157: True/false: all
p. 157-158: Multiple choice: all
p. 158-10: Discussion: all

Suggested Programming Exercises

p. 160-163: 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13

Chapter 6
Defining Functions (2 classes)


6.1 The function of functions

6.5 Getting results from a function: return values, modify parameters

6.2 Functions, informally

6.6 Functions and program structures

6.3 Future value with a function

6.7 Chapter summary

6.4 Functions and parameters: the details


Suggested Review Questions

6.8 Exercises

p. 191-192: True/false: all
p. 192-193: Multiple choice: all
p. 193-194: Discussion: all

Suggested Programming Exercises

p. 194-197: 3, 4, 5, 6, 8, 9, 11, 12, 13, 14, 15, 16

Chapter 7
Decision Structures (2 classes)


7.1 Simple decisions

7.4 Exception handling

7.2 Two-way decisions

7.5 Study in design: Max of three

7.3 Multiway decisions


Suggested Review Questions

7.6 Exercises

p.225-226: True/false: all
p.226-227: Multiple choice: all
p.227-228: Discussion: all

Suggested Programming Exercises

p. 228-231: 1, 2, 3, 5, 6, 11, 12, 13, 15, 17

Chapter 8
Loop Structures and Booleans (2 classes)


8.1 For loops: a quick review

8.4 Computing with booleans

8.2 Indefinite loops

8.5 Other common structures: post-test, loop and a half

8.3 Common loop patterns: interactive, sentinel, file, nested

8.6 Chapter summary

Suggested Review Questions

8.7 Exercises

p. 259-260: True/false: all
p. 260-261: Multiple choice: all
p. 261: Discussion: all

Suggested Programming Exercises

p. 262-264: 1, 2, 3, 5, 7, 8, 9

Chapter 9
Simulation and Design (3 classes)


9.1 Simulating Racquetball

9.4 Bottom up implementation

9.2 Pseudo random numbers

9.5 Other design techniques

9.3 Top-down design

9.6 Chapter summary

Suggested Review Questions

9.7 Exercises

p. 289: True/false: all
p. 289-290: Multiple choice: all
p. 290-291: Discussion: all

Suggested Programming Exercises


p. 291-294: 1, 2, 3, 4, 5, 7, 10, 12, 13, 14

Chapter 10
Defining Classes (2 classes)


10.1 Review of Objects

10.5 Objects and Encapsulation

10.2 Example Program: cannonball

10.6 Widgets

10.3 Defining New Classes

10.7 Chapter Summary

10.4 Data Processing with Classes


Suggested Review Questions

10.8 Exercises

p.329-330: True/False: all
p. 330-331: Multiple choice: all
p. 331-332: Discussion: all

Suggested Programming Exercises


p. 332-336: 1, 2, 3, 4, 5, 7, 9, 11, 12, 13, 14

Chapter 11
Data Collections (3 classes)


11.1 Example Problem: Simple Statistics

11.6 Nonsequential collection

11.2 Applying lists

11.7 Chapter summary

11.3 Lists of objects


Suggested Review Questions

11.8 Exercises

p. 376: True/false: all
p. 377: Multiple choice: all
p. 377-378: Discussion: all

Suggested Programming Exercises

p. 378-383: 1, 2, 3, 4, 5, 6, 7, 8, 10

May 2008/SEP/updated May 2009/SEP