Introduction to Computer Science and Programming

 

Assignments

Getting Started

Getting Started: Python and IDLE (PDF)

If you are working on your own machine, you will probably need to install Python. We will be using the standard Python software, available here. You should download and install version 2.5.4.

Warning: On the Python homepage, the latest version available for download is actually 3.0. Do not install this! This version is not backwards compatible with the code that you'll be writing in this course (for example, you have to type print("test") instead of print test.)

ASSN #

PROBLEM SETS

SUPPORTING FILES

0

A very simple program: entering and printing your name (PDF)

 

1

Computing prime numbers, product of primes (PDF)

 

2

Diophantine equations (PDF)

ps2b.py (PY)

3

Matching strings: a biological perspective (PDF)

ps3_template.py (PY)

4

Simulating a retirement fund (PDF)

ps4.py (PY)

5

Word games (PDF)

ps5.py (PY)

test_ps5.py (PY)

ps5_ghost.py (PY)

words.txt (TXT)

6

Word games 2 (PDF)

ps6.py (PY)

words.txt (TXT)

7

Review problems (PDF)

 

8

Dynamic programming (PDF)

ps8.py (PY)

subjects.txt (TXT)

9

Classes and methods (PDF)

ps9.py (PY)

shapes.txt (TXT)

10

Object-oriented programming; graphical user interface for word game (PDF)

ps10.py (PY)

ps10_test.py (PY)

ps10_gui.py (PY)

words.txt (TXT)

11

Simulating robots (PDF)

ps11.py (PY)

ps11_visualize.py (PY)

12

Simulating virus population dynamics (PDF)

ps12.py (PY)

 

Exams

This section contains sample problems and solutions for the two quizzes during the semester. For the final exam (also known as quiz 3), solutions are not available. Students were also given a code sample to study in preparation for the final exam.

EXAMS

FILES

Quiz 1

Sample problems (PDF)

Solutions to sample problems (PDF)

Quiz 2

Sample problems (PDF)

Solutions to sample problems (PDF)

Quiz 3 (final exam)

List of topics covered (PDF)

Code sample for quiz (PY)

Explanation of code sample (PDF)

Sample problems (PDF)