CS A131: Python Programming I
| Item | Value |
|---|---|
| Eff Term | Fall 2026 |
| Curriculum Committee Approval Date | 12/03/2025 |
| Top Code | 070600 - Computer Science (Transfer) |
| Units | 3 Total Units |
| Hours | 108 Total Hours (Lecture Hours 27; Lab Hours 81) |
| Total Outside of Class Hours | 54 |
| Total Student Learning Hours | 162 |
| Course Credit Status | Credit: Degree Applicable (D) |
| Material Fee | No |
| Basic Skills | Not Basic Skills (N) |
| Repeatable | No |
| Open Entry/Open Exit | No |
| Grading Policy | Standard Letter (S),
|
| Associate Arts Local General Education (GE) |
|
| Associate Science Local General Education (GE) |
|
Course Description
Introduction to fundamental concepts and techniques for writing software in Python. Topics include the syntax and semantics of data types, expressions, input/output, exception handling, functions and parameter passing, control structures (decision and repetition), built-in data structures (lists, tuples, strings, dictionaries, and sets), randomness, object-oriented programming with classes, inheritance, polymorphism, recursion, and the pragmatics of programming. ADVISORY: CIS A090; and CIS A100 or CIS A111. Transfer Credit: CSU; UC. C-ID: COMP 112.C-ID: COMP 112.
Course Level Student Learning Outcome(s)
- Students will be able to design, implement, test, and debug Python programs that use input/output, decision and repetition structures, functions with parameter passing, and exception handling to solve basic computational problems.
- Students will be able to apply built-in Python data structures (lists, tuples, strings, dictionaries, and sets) to store, manipulate, and retrieve data.
- Students will be able to construct object-oriented programs in Python using classes, inheritance, and polymorphism, and implement recursive functions to solve appropriate problems .
Course Objectives
- Design, implement, test, and debug algorithms and programs in Python.
- Use fundamental programming constructs including computation, input/output, conditionals, iteration, and functions with parameter passing.
- Use Python data types and data structures (such as lists and dictionaries) to represent and process information.
- Apply abstraction through functions and classes to manage complexity and improve program reliability.
- Explain variable binding, scope, and lifetime in program execution.
- Apply systematic problem-solving and debugging methods to produce efficient and reliable solutions.
- Analyze and predict program behavior through code tracing and execution.
- Summarize the historical evolution of programming languages and its influence on modern paradigms.
Lecture Content
- Introduction to Computer Science
- Roles and responsibilities of computing professionals
- Models, algorithms, and programming tools
- Evolution of programming languages
- Binary instructions and low-level languages
- Compiled vs. translated languages
- Hardware, operating systems, networks, and protocols
- Software libraries and their role in development
- The Python Programming Language
- A short history of Python
- Setting up the Python development environment
- Computational Thinking
- Abstraction and modeling
- Algorithms and their properties
- Problem-solving strategies
- The role of algorithms in problem-solving
- Implementation strategies for algorithms
- Python Data Types
- Expressions, variables, and assignments
- Algebraic expressions and functions
- Boolean expressions, operators, and Boolean variables
- Rules for variable names
- Type checking and type incompatibility
- Mutable and immutable types
- Assignments and mutability
- Swapping
- Valid values for number types
- Operators for number types
- Imperative Programming
- Python Programs (IPO)
- Python Modules
- Built-in function print()
- Interactive input with input()
- Using the eval() function
- Introducing Control Structures
- One-way and two-way decisions
- The if statement
- The if-else statement
- Nested decision structures (if-elif-else)
- Logical operators
- Multi-way decisions
- Ordering of conditions
- Repetition Structures (Loops)
- Iteration control structures
- The while loop (condition-controlled loop)
- The for loop (count-controlled loop)
- Using range()
- Iteration patterns: counter, accumulator, sequence loop
- Calculating a running total
- Sentinels
- Input validation loops
- Infinite loop, loop and a half
- Nested loops
- Iteration control statements: break, continue, pass
- Strings and Text Data
- Basic string operations and operators
- The indexing operator
- String slicing
- Searching, and manipulating strings
- String methods
- Formatted output: print(), format(), aligning columns
- Lists and Sequences
- Overview of sequences
- List creation and operators
- List slicing
- Finding items with the in operator
- Mutability of lists (vs. immutability of strings)
- List methods
- Useful built-in functions (len, min, max, sum)
- Two-dimensional lists
- Objects and Classes
- Object type
- Valid values for number types
- Operators for number types
- Creating objects
- Implicit and explicit type conversions
- Class methods and object-oriented programming
- Procedural vs. object-oriented programming
- Working with instances
- Designing classes
- Inheritance and class relationships
- Polymorphism
- Introducing the Python Standard Library
- Module math
- Module fractions
- User-defined Functions and Modules
- Basic function syntax
- Defining and calling a void function
- Using return instead of print()
- Function definition and assignment
- Designing programs with functions
- Local variables
- Passing arguments to functions
- Immutable parameter passing
- Mutable parameter passing
- Global variables and global constants
- Comments and docstrings
- Structured decomposition
- Binding, visibility, scope, and lifetime management
- Files and Exceptions
- The file system
- Opening and closing a file
- Reading from a text file
- Writing to a text file
- Using loops to process files
- Processing records
- Errors and Exceptions
- Syntax errors
- Built-in runtime exceptions
- Debugging strategies
- Containers and Randomness
- Dictionaries (properties, operators, methods)
- Substituting a multi-way condition
- Collecting counters
- Tuples
- Using tuple objects as dictionary keys
- Sets (operators and methods)
- Removing duplicates with the set constructor
- Module random
- Choosing random integers and real numbers
- Shuffling, choosing, and sampling
- Serializing objects
- Recursion
- Introduction to recursion
- Problem solving with recursion
- Recursive algorithms
Lab Content
The following programming labs and exercises are designed to help students master the topics learned by providing hands-on practice for a comprehensive understanding of the material:
- Introduction and Python Basics
- Practice solving algebraic expressions and functions using Python.
- Identify and fix syntax errors in provided Python code.
- Implement user-defined functions for common computations.
- Flow of Control
- Develop programs that make decisions using if statements and compound conditions.
- Implement loops to address various iteration patterns, including sentinels and validation loops.
- Data Types and Structures
- Manipulate strings and lists efficiently.
- Work with tuples and references to lists to understand mutability and dynamic arrays.
- Solve problems using lists, nested loops, and two-dimensional lists for intricate scenarios.
- Create, modify, and access data in dictionaries efficiently.
- Use sets strategically to remove duplicates and model membership.
- Functions and Decomposition
- Break programs into smaller subtasks using functional decomposition.
- Engage in programming exercises focused on string representation and formatted output.
- Objects and Classes
- Create simple classes with methods tailored for different number types.
- Define and expand classes across multiple modules to demonstrate modular programming.
- Implement inheritance and polymorphism in object-oriented design.
- Files, Exceptions, and Debugging
- Read and write data to and from text files proficiently.
- Handle various types of errors and exceptions, including custom error handling.
- Apply debugging strategies to test, trace, and improve code.
- Advanced Topics
- Apply the random module for generating random data in a controlled manner.
- Design and test recursive solutions for mathematical or data-driven problems.
- Integration and Collaboration
- Collaborative project where students apply multiple concepts learned in a larger system.
- Peer review: Analyze and enhance each other's code for better practices.
Method(s) of Instruction
- Lecture (02)
- DE Live Online Lecture (02S)
- DE Online Lecture (02X)
- Lab (04)
- DE Live Online Lab (04S)
- DE Online Lab (04X)
Instructional Techniques
Lecture, demonstration, and in-class programming exercises.
Reading Assignments
Students will spend a minimum of 3 hours per week reading the textbook and/or other reading material assigned. Students will be expected to follow along with the exercises in the reading material.
Writing Assignments
Students will spend a minimum of 5 hours per week writing code.
Out-of-class Assignments
Students will spend a minimum of 4 hours per week completing weekly programming assignments.
Study Non-Contact Hours Recommended
54
Methods of Student Evaluation
- Midterm Exam
- Final Exam
- Short Quizzes
- Written Assignments
- Objective Examinations
- Projects (Individual/Group)
- Problem Solving Exercises
- Skills Demonstration
Demonstration of Critical Thinking
Students will demonstrate the ability to write programs that solve different kinds of problems.
Required Writing, Problem Solving, Skills Demonstration
Students will demonstrate proficiency writing Python programs.
Resources Subscreen
- Textbook: Gaddis, Tony. Starting Out with Python. Pearson (2024).
Eligible Discipline(s)
- Computer science: Master’s degree in computer science or computer engineering OR bachelor’s degree in either of the above AND master’s degree in mathematics, cybernetics, business administration, accounting or engineering OR bachelor’s degree in engineering AND master’s degree in cybernetics, engineering mathematics, or business administration OR bachelor’s degree in mathematics AND master’s degree in cybernetics, engineering mathematics, or business administration OR bachelor’s degree in any of the above AND a master’s degree in information science, computer information systems, or information systems OR the equivalent. Note: Courses in the use of computer programs for application to a particular discipline may be classified, for the minimum qualification purposes, under the discipline of the application. Master's degree required.
