Claas Röver's Teaching Pages - Course CS103 Sem 1 2011/12
This course is the programming part of a course that is entitled
Computer Science. It is also part of CS102 and CS105.
You will learn how programming languages are used to
program a general purpose computer.
You will learn some general programming terminology such as algorithms,
procedures, loops, return value, assignment, comparison etc.
During practical computer labs you will learn how to use the Python
programming language in order to make your computer do what you like.
Lectures: Wednesdays 2-3pm (Tyndal) and Thursdays 1-2pm (Dillon)
Computer Lab:
Monday OR Tuesday 3-6pm in the McKenna suit (Áras Uí Chathail); pick your day
Assessment: Continuous Assessment (counts 20% for CS103 and 10%
for CS102/CS105) and Exam (summer).
Continuous Assessment Details
What? The continuous assessment marks are given for
completing
either Programming Project 1
or Programming
Project 2 (see below). Partial marks may be given for code that
almost works.
When? The DEADLINE for submission is
midnight on Friday, 9 December, 2011.
How?
Use the
project submission form.
Books
John Zelle,
Python Programming: An Introduction to Computer Science,
2nd Edition, Franklin, Beedle & Associates, 2010
The
graphics module and its
manual that accompany
John Zelle's book. Except for some additional doc-strings, these are identical with the files at
the book's web page.
Links
You can download Python for Windows from
the Python home page.
Use a 3.x.x version because that's what we will use and 2.x.x is very different in some ways.
Transparencies/Handouts
A first example in
ps or
pdf format
Examples on terminology in
ps or
pdf format
Python statements in
ps or
pdf format
Sequences in Python in
ps or
pdf format
Leture November 10, 2011 --
Animated Star Code The reason for not posting the code is that typing it helps to understand it.
Problem Sheets
Sheet 1 in
ps or
pdf format
Sheet 2 in
ps or
pdf format
Sheet 3 in
ps or
pdf format
Sheet 4 in
ps or
pdf format,
sphere_test.py,
primes_test.py
Sheet 5 in
ps or
pdf format,
sphere.py
Sheet 6 in
ps or
pdf format
Sheet 7 in
ps or
pdf format
Sheet 8 in
ps or
pdf format
Programming Project 1 - Spherical Distances
Introductory Notes & Specification
Sheet 5 and its back page
Sequences in Python. Initial version of Python module
sphere.
Sheet 6 and the following
data files.
cities.txt.gz (zipped 30Mb and 89Mb unzipped) was extracted from the large (~1Gb) database available at
geonames.org. It contains over 3 million city/town/village names, one per line, each having four TAB separated entries:
name, country code, latitude, longitude. The latter two are in decimal degrees. You need to unzip this file after downloading.
ISO-3166_alpha-2.txt is a table of country names and their ISO 3166-1 country codes separated by a semicolon.
Programming Project 2 - Minesweeper
Sheet 7 contains the specification and rules of the game.
The function
getNbhd(row, col) which returns the list of the coordinates (i.e. pairs) of the neighbouring squares of the square at
(row, col) was discussed in the lectures.
Sheet 8 and its back page with
Minesweeper flow diagrams