|1. Description - |
|Introduction to the Python language and environment. Covers topics including object oriented programming, elementary data structures, modules, algorithms, recursion, data abstraction, code style, documentation, debugging techniques and testing.|
|Advisory: One of the following: C S 1A, 1AH, 2A, 2AH or equivalent.|
|2. Course Objectives - |
|The student will be able to: |
- Describe the basic elements of the Python language and the Python interpreter and discuss the differences between Python and other modern languages.
- Analyze and demonstrate the use of lists and tuples in Python.
- Describe and use Python dictionaries correctly and demonstrate the use of dictionary methods.
- Define, analyze and code the basic Python conditional and iterative control structures and explain how they can be nested and how exceptions can be used.
- Design, implement, test, and debug functions and methods that can be used in programs, and demonstrate the way parameters are passed in such functions and methods.
- Write classes to demonstrate the ideas of encapsulation, inheritance, interfaces and object oriented program design.
- Explain and demonstrate methods of error handling and Python exceptions.
- Demonstrate the understanding of “magic methods” through use of these in the context of a Python application.
- Use pre-written modules and learn the techniques necessary for creating modules.
- Write to and read from files using intermediate file I/O operations in a Python program.
- Use an existing library to implement a graphical user interface
- Design, implement, test, and debug a program that uses each of the following fundamental programming constructs: string processing, numeric computation, simple I/O, arrays and the Python standard library.
- Solve problems that have origins in a variety of disciplines including math, science, the Internet and business.
|3. Special Facilities and/or Equipment - |
- Access to a computer laboratory with Python interpreters.
- Website or course management system with an assignment posting component (through which all lab assignments are to be submitted) and a forum component (where students can discuss course material and receive help from the instructor). This applies to all sections, including on-campus (i.e., face-to-face) offerings.
- When taught via Foothill Global Access on the Internet, a fully functional and maintained course management system through which the instructor and students can interact.
- When taught via Foothill Global Access on the Internet, students must have currently existing e-mail accounts and ongoing access to computers with internet capabilities.
|4. Course Content (Body of knowledge) - |
- Introduction to Python
- Structure of a Python program
- The Python interactive interpreter
- Basic input and output
- Comparison of major languages
- Online Python resources
- Lists and Tuples
- Common sequence operations
- Basic operations and methods
- Control Structures
- Selective and conditional statements
- Loop statements
- Nesting levels in control statements
- Handling exceptions
- Methods and Functional Programming
- Parameter passing
- Functional returns
- Variable scope
- Lambda functions
- Object-Oriented Programming - Classes and Methods
- Encapsulation of member data and methods
- Access modifiers and data privacy
- Encapsulation and properties
- Instance vs. static members
- Instance, class and static methods
- Object composition (the "has a" relationship)
- Inheritance (the “is a” relationship)
- Object oriented design
- Error Reporting
- Raising exceptions
- Catching exceptions
- Multiple except clauses
- Catching two exceptions with one block
- Catching the object
- Implementing the non-exceptional situation
- The finally clause
- Exceptions and functions
- Magic Methods
- Item access
- Module use
- Creating modules
- Exploring available Python modules
- The standard library
- Events and event driven programming using a predefined module.
- Opening files
- Basic file methods
- Iterating over file contents
- Accessing remote files with urllib
- Graphical User Interfaces
- Comparison of GUI toolkits
- GUI features
- Event handling
- Essential examples and Assignment Areas
- String/text processing
- Numeric computation
- User interaction through the console
- Lists and tuples
- Using Python-defined modules
- Creating and using a programmer-defined class
- Applications used throughout course in selected areas
- Business and finance
|5. Repeatability - Moved to header area.|
|6. Methods of Evaluation - |
- Tests and quizzes
- Written laboratory assignments which include source code, sample runs and documentation.
- Final examination
|7. Representative Text(s) - |
|Lutz, Mark. Learning Python. O'Reilly, 2013. |
|8. Disciplines - |
|Computer Science |
|9. Method of Instruction - |
- Lectures which include motivation for syntax and use of the Python language and OOP concepts, example programs, and analysis of these programs.
- On-line labs (for all sections, including those meeting face-to-face/on campus) consisting of
- A programming assignment web-page located on a college-hosted course management system or other department-approved Internet environment. Here, the students will review the specification of each programming assignment and submit their completed lab work.
- A discussion web-page located on a college hosted course management system or other department-approved Internet environment. Here, students can request assistance from the instructor and interact publicly with other class members.
- Detailed review of programming assignments which includes model solutions and specific comments on the student submissions.
- In person or on-line discussion which engages students and instructor in an ongoing dialog pertaining to all aspects of designing, implementing and analyzing programs.
- When course is taught fully on-line:
- Instructor-authored lecture materials, handouts, syllabus, assignments, tests, and other relevant course material will be delivered through a college hosted course management system or other department-approved Internet environment.
- Additional instructional guidelines for this course are listed in the attached addendum of CS department on-line practices.
|10. Lab Content - |
- Familiarization with the beginning-level lab environment
- Modify and customize the settings of an Integrated Development Environment (IDE).
- Use the IDE to create a new programming project.
- Organize projects within an IDE to make submitting labs and switching project environments an orderly process.
- Gain experience with the steps needed to edit a simple program.
- Modify IDE settings to produce an industry standard code style..
- Exploring the different data types using the compiler/IDE
- Gain experience in effectively using the IDE to create code with Python numeric and string types.
- Gain experience in effectively using the IDE to create code with simple data structures
- Use the IDE to assist in defining and using compound data types.
- Solve syntax and logic problems that arise from typical incorrect formulation of data types.
- Demonstrating user interaction (I/O) through the console and graphical interface
- Play the role of user and programmer, alternately, to establish a user-interaction plan for a program.
- Evaluate and comment on other students' user-interaction plan.
- Change modes from source code design (editing mode) to end-user interaction (run mode) in the IDE in order to perform Q/A on the program.
- Fix poor interaction behavior by adjusting source code and rerunning program until a satisfactory result is achieved.
- Building a program that demonstrates “intelligence” though a combination of control statements
- Become familiar with selection, loop and nesting to imbue a program with correct logic behavior.
- Use structured programming to make control structures maintainable.
- Run the program multiple times to verify that its control statements produce the correct behavior or output under any scenario.
- Fix incorrect logic behavior by adjusting control structures and rerunning program until a satisfactory result is achieved.
- Incorporating functions and class methods in programming projects
- Gain experience in writing a function/method.
- Use a previously written function or method in a client program.
- Refine methods/functions by adding or changing their definitions and observe the result.
- Deduce the impact of a function's or method's design on the programs that invoke it.
- Building a program around object-oriented techniques
- Use previously written classes to instantiate objects in program.
- Use the IDE to assist in the creation of a programmer-defined class.
- Demonstrate the correct choice of class members and methods for each class used.
- Import and use Python modules in conjunction with user written code.
- Exploring Lists, Tuples and Dictionaries
- Understand the proper use of lists, tuples and dictionaries.
- Incorporate a of lists, tuple or dictionary into a program to facilitate the solution of an assigned problem.
- Investigate use of sequence operations to shorten and clarify the logic in programs.
- Use debugging techniques to solve problems that arise during the testing of a program.
- Devising and utilizing algorithms
- Write a program that uses a combination of techniques such as looping, lists, logic and user I/O, all encapsulated in a coherent algorithm.
- Test the algorithm by running the program multiple times giving it different initial values or inputs.
- Implement a sorting or simple searching algorithm using arrays.
- Transcribe an abstract algorithm into a concrete program that is written and tested using the IDE and submitted online for evaluation.
- Organizing and debugging multi-class projects
- Demonstrate the ability to debug programs that contain multiple classes.
- Distinguish between interface and implementation in projects by creating classes that are independent of I/O modality.
- Write individual component classes that are independent of client use and can serve several client programs.
- Incorporate symbolic constants, statics and instance members into classes in a way that demonstrates a mature understanding of object-oriented programming (OOP) in a lab project.
- Debug a multi-class project to produce a working program.
- Building a program that uses class inheritance and interfaces to demonstrate how re-use is handled in OOP.
- Create a project that contains at least one class intended to be used as a base class.
- Derive (sub-class) one or more classes from the base class or classes.
- Create and use an interface to solve a given problem.
- Exceptions and File I/O in Programming
- Write a class that has methods which use exception handling to report errors to the client.
- Write a test client that uses try/catch blocks to detect exceptions.
- Implement an algorithm or simulation that reads from and/or writes to files rather than the user screen
- Demonstrate various ways errors are handled and reported besides exceptions.
|11. Honors Description - No longer used. Integrated into main description section.|
|12. Types and/or Examples of Required Reading, Writing and Outside of Class Assignments - |
- Textbook assigned reading averaging 30 pages per week.
- Reading the supplied handouts and modules averaging 10 pages per week.
- Reading on-line resources as directed by instructor though links pertinent to programming.
- Reading library and reference material directed by instructor through course handouts.
- Writing technical prose documentation that supports and describes the programs that are submitted for grades.
|13. Need/Justification - |
|This course is a restricted support course for the A.S. degree in Computer Science. |