De Anza logo Course Outlines

Public Search

 
 
Close Window/Tab
PRINT VIEW -- Opens in new, second window. Use browser controls to close when finished.
Credit- Degree applicable
Effective Quarter: Fall 2021

I. Catalog Information

CIS 41A
Python Programming
4.5 Unit(s)

 

Requisites: Prerequisite: CIS 22A or 36A or 40.

Hours: Lec Hrs: 48.00
Lab Hrs: 18.00
Out of Class Hrs: 96.00
Total Student Learning Hrs: 162.00

Description: A complete introduction to the Python language. Topics covered include: primitive and collection data types, operators and statements, loops and branching, functions and variable scoping, modules and packages, object oriented programming, file handling, regular expressions and exception handling


Student Learning Outcome Statements (SLO)

 

• Student Learning Outcome: Design, code, document, analyze, debug, and test introductory level Python programs that include Python modules.


II. Course Objectives

A.Choose appropriate data types
B.Write statements that use expressions, operators, and built-in functions
C.Apply control structures to create loops and conditional blocks of code
D.Write code to handle data input/output through standard IO and files
E.Design user-defined functions for modularization of code
F.Import and apply common Python modules and packages
G.Create custom classes and apply object oriented programming concepts
H.Handle exceptions in the program
I.Apply regular expressions for text parsing

III. Essential Student Materials

 None

IV. Essential College Facilities

 Lab with computers that have the Python interpreter and IDE (Integrated Development Environment) installed

V. Expanded Description: Content and Form

A.Choose appropriate data types
1.Keywords and identifiers
a.References
b.Mutable and immutable data
2.Primitives
a.Integral
1.Integers
2.Boolean
b.Floating point
c.None data value
3.Containers
a.Strings
b.Lists, tuples
c.Sets
d.Dictionaries
e.Collections
1.Named tuples
2.Default dictionaries
f.Comprehension
g.Data structure
1.Nested structures
2.Processing sequences in parallel
3.Sorting by a specific field in a data structure
B.Write statements that use expressions, operators, and built-in functions
1.Arithmetic operators
2.Assignment operators
3.Bitwise operators
4.String operators and methods
5.Relational operators
6.Logical operators
7.Membership operators
8.Identity operators
9.Order of operations
10.Built-in functions and modules for numeric, strings, and container operations
C.Apply control structures to create loops and conditional blocks of code
1.Selection statements
a.if else statement and if elif else statement
b.Nested if statements
2.Loops
a.for loop - the range function
b.while loop
c.Loop control flow statements
d.Nested loops
3.Recursion
D.Write code to handle data input/output through standard IO and files
1.print and input functions
2.Output formatting
3.Text file
a.File open, close, and mode
b.File read and write functions
c.The with context manager
4.CSV File
a.File open, close, mode
b.The csv reader and writer
c.The with context manager
E.Design user-defined functions for modularization of code
1.Defining a function
2.Calling a function
3.Function arguments
a.Required arguments
b.Default arguments
c.Positional arguments
d.Keyword arguments
e.Variable length argument lists
1.Argument unpacking
2.Parameter packing
4.Docstrings
5.Functions as first class objects
a.Function reference
b.Function reference as input argument and return value
c.Storing and calling function references in containers
F.Import and apply common Python modules and packages
1.import statements
2.Namespace and scoping
3.Create modules
G.Create custom classes and apply object oriented programming concepts
1.Create classes and instances
2.Overloading: special methods or dunder methods
3.Data hiding and encapsulation
a.Class attributes
b.Instance attributes
4.Inheritance
a.Overriding the superclass methods
b.Polymorphism
H.Handle exceptions in the program
1.Exception handling and program flow control
2.Standard exceptions
3.Handling exceptions
a.try except blocks
b.finally and else blocks
4.Raising an exception
I.Apply regular expressions for text parsing
1.Regular expression metacharacter set
2.Regular expression operators
3.Regular expression patterns
4.search, findall, finditer
5.Substitute
6.Grouping

VI. Assignments

A.Reading: Required reading from the textbook and class notes
B.Programs: 6-8 programming homework assignments, several with 200 or more lines of code.

VII. Methods of Instruction

 Lecture and visual aids
Discussion of assigned reading
Discussion and problem solving performed in class
Quiz and examination review performed in class
Homework and extended projects
Collaborative learning and small group exercises
Collaborative projects
Laboratory discussion sessions and quizzes that evaluate the proceedings weekly laboratory exercises

VIII. Methods of Evaluating Objectives

A.Evaluation of programming assignments for correctness, use of structured design principles, documentation and efficiency.
B.In-class lab problems, group collaboration problems, quiz questions and/or online tutorials requiring the ability to read and analyze code through debugging and writing snippets of code.
C.One or more midterm examinations requiring programming ability to develop an algorithm, evaluate code segments, and write code using specific programming constructs presented in the course.
D.A final examination requiring programming ability to develop an algorithm, evaluate code segments, and write code using specific programming constructs presented in the course.

IX. Texts and Supporting References

A.Examples of Primary Texts and References
1.Horstmann, Cay and Necaise, Rance: Python for Everyone, 2nd edition. Wiley. ISBN: 978-1-119-05655-3. 2016
2.Lubanovic, Bill: Introducing Python, 2nd Edition. O'Reilly. ISBN: 978-1492051367. 2019
B.Examples of Supporting Texts and References
1.Lutz, Mark: Learning Python, 5th edition. O'Reilly Media. ISBN: 978-1-4493-5573-9. 2013
2.python.org online documentation: https://docs.python.org/3/

X. Lab Topics

A.Write and debug code that uses correct data types
B.Write and debug code that uses expressions and built-in functions
C.Write and debug code that uses selection statements and loops
D.Write and debug code implementing file I/O
E.Write and debug code that implements multiple user defined functions
F.Write and debug code that use built-in and user-defined modules and packages
G.Write and debug code that implements user-defined classes
H.Write and debug code that uses exception handling
I.Write and debug code that uses regular expressions