Lecture: 3 hours/week
and
Lab: 1 hour/week
The topics are covered through in-class lectures, laboratory assignments, readings, and research.
1. Introduction to computers and programming
• Hardware and software
• Programming languages, compilers and interpreters
• Programming errors and code debugging
• Integrated development environment
• Representation of data in memory, text encoding and number systems, such as binary, octal and hexadecimal
2. Input, processing and output
• Introduction to pseudocode and flowcharts
• Variables, literals and named constants
• Receiving input and formatting output
• Arithmetic operators and data conversion functions
• Type casting
• Comments and documentation
3. Decision Structures and Boolean logic
• Boolean expressions, relational and logical operators
• If statements
• If-else statements
• If-else if-else statements
• Nested decision structures
4. Repetition Structures
• Condition and count controlled loops
• Sentinels and validation loops
• Infinite loops with break and continue
• Nested loops
5. Procedural programming and functions
• Problem decomposition to support code modularization
• Defining and calling functions
• Passing values to functions
• Scope of variables
• Void and value returning functions
• Use of functions to create reusable code and design programs
• Writing modules
• Standard library functions
• The components of a recursive function
6. Lists & Tuples
• Indexing, accessing and iterating by index vs by element
• Mutable vs immutable types, such as lists and tuples
• Methods and useful built-in operators
• Two-dimensional lists
• Ordering, copying, comparing and slicing lists
7. Strings
• Basic string operations
• String slicing
• Testing, searching and manipulating strings
8. Files
• Sequential file access to a text file
• Reading, writing and appending data from/to a text file
• Records to store complex data
• Processing and creating formatted data files, such as CSV
9. Exceptions
• Raising exceptions
• Re-raising exceptions
• Handling exceptions
• Program control transfer when exceptions occur in a function
10. Complex representations of data
• Creating dictionaries
• Processing dictionaries
• Dictionary methods
11. Fundamental algorithms and introduction to efficiency analysis
• Sorting algorithms, such as selection and bubble sort
• Searching algorithms, such as linear and binary search
• Overview of program efficiency metrics, such as step counting and benchmarking
• Complexity of searching and sorting algorithms
Upon successful completion of this course, students will be able to:
• describe the main components of a computer and how they work together when a program runs;
• employ numeral systems and data representation in memory;
• design algorithms as part of solving small problems and describe the program development process;
• write a program using fundamental programming constructs including literals, variables, expressions, named constants, operators, basic console I/O and text file I/O;
• analyze, test and debug programs for syntax, logic and run-time errors;
• create readable and maintainable programs using standard coding style and documentation;
• recognize runtime errors and handle exceptions;
• develop programs with control structures such as decisions and loops;
• choose an appropriate data structure for a program, such as a string, list or dictionary and apply related operations and methods to write an effective program;
• write reusable code using functions and variable scope;
• outline basic searching and sorting algorithms and contrast their efficiency;
• implement and trace recursive functions, and contrast them with iterative implementations.
Assessment will be in accordance with the Douglas College Evaluation Policy. The instructor will present a written course outline with specific evaluation criteria at the beginning of the semester. Evaluation will be based on the following:
Assignments: 10% - 20%
Quizzes: 0% - 20%
Term Test(s): 20% - 35%
Final Examination: 25% - 40%
Class Participation and Attendance: 0% - 5%
Total: 100%
Consult the Douglas College Bookstore for the latest required textbooks and materials. Example textbooks and materials may include:
Tony Gaddis. (current edition). Starting Out With Python. Pearson.
One of Pre-Calculus 11 (C or better)
or
Foundations of Math 11 (C or better)
or
MATU 0411 (C or better)
None
None