General Information ====================================================================================== Course Name: * [*CS110*: Computation, programs and programming](https://registrar.corpuschristi.ca/classes/2319/) Term/Year: * 2023W T1 (Sept-Dec 2023) Class Schedule: * Lecture: Friday 9-11:50am * Lab: Friday 1:30-2:30pm Instructor: * Geoffrey Woollard Office Hours: * Wednesday 11:00am – 12:00pm. Room 302. Calendar Description ====================================================================================== This course offers fundamental program and computation structures. The course takes you through introductory programming skills exploring computation as a tool for information processing, simulation and modeling, and interacting with the world. Course Description ====================================================================================== An introduction to computer programming made for students with very little or no programming knowledge. The fundamental concepts and terminology of computing science will be taught so that the students can acquire elementary skills for programming in Python. This knowledge can be applied in diverse fields and applications of computing science. Course Pre-requisite(s): : - Grade 12 Math Learning Outcomes ====================================================================================== 1. Describe fundamental concepts pertaining to computing science: * Computer science * Problem solving * Algorithms * Decomposition * Abstraction * Computer program * Programming language * History of computers/computation 2. Describe and apply fundamental concepts and terminology of Python: * Variables, types, expressions, operators, statements, parameters * Conditions and execution flow * Calling functions * Variable scope: * Rules of scope for local variables in functions * Rules for accessing global variables from within a function 3. Create (design), analyze, and explain the behaviour of simple algorithms: * Express algorithms in pseudocode and flowchart diagrams * Solve problems by designing simple algorithms, e.g., basic calculations, searching in strings and lists, counting, calculating running sums and products * Create while loops with compound conditions * Design simple algorithms following principles of structured programming * Design algorithms that avoid the use of break statements to interrupt loops or to avoid the use of multiple return statements to exit a function * Describe and illustrate the operation of searching and sorting algorithms * Analyze the running time of simple iterative algorithms * Compare the running time of algorithms; determine if one algorithm is more efficient than another 4. Create (design) small to medium size programs using Python: * Decompose a solution into parts; decompose a Python program into functions * Translate pseudocode to/from Python programs * Use the core features of Python to design programs to solve problems: variables, expressions, terminal input and output, type conversion, conditionals, iteration, functions, standard library modules * Design programs requiring approximately 100 lines and 6 functions (of well-designed code) * Create programs that search or construct lists and strings * Create programs that modify lists in-place * Refactor repeated statements into for and while loops * Describe the benefits of using functions * Construct functions such that: * have a single purpose (decomposition) * are reusable (generalization) * include parameters and local variables * produce a return value * Distinguish "printing inside a function" from "returning a value from a function" * Create readable and maintainable programs by applying good programming style: * Using descriptive variable and function name * Using comments appropriately * Using whitespace to clarify the structure of a program 5. Use Python's data types (including objects) appropriately: * Compare and contrast mutable and immutable data types (lists vs. strings, numeric values) 6. Describe fundamental concepts of time complexity. Identify the order of basic algorithms. 7. Describe the concept of recursion, of recursive definitions and recursive functions. 8. Use recursion to solve problems: * Use box tracing to predict the result of simple recursive code (drawing a call stack) * Design recursive code following certain basic recursive patterns * Design recursive functions that recurse, for example, on lists and strings Required Texts & Resources ====================================================================================== Textbooks: * *_TP_*: Elkner et al., [_Think Python - How to Think Like a Computer Scientist, 2nd Edition_](https://runestone.academy/runestone/books/published/thinkcspy/index.html) * *_PS_*: Miller et al., [_Problem Solving with Algorithms and Data Structures using Python_](https://runestone.academy/runestone/books/published/pythonds/index.html) Hardware: : - (Recommended) A personal laptop running a modern web browser (Linux, macOS, Windows). Course Requirements ====================================================================================== No prior programming experience is required. Basic computer literacy is expected including keyboarding skills, file management and use of a web browser. Grade Distribution ====================================================================================== Component | Percentage --------------------------|------------------- Quizzes | 10% Labs | 20% Assignments | 20% (Midterm) Exam 1* | 10% (Midterm) Exam 2* | 10% (Final) Exam 3* | 20% In-class participation | 10% *The student’s average exam mark (midterms and final) must be above 50% to pass the course. Course Policies ====================================================================================== It is the responsibility of every student to read and understand the College Policies. The College Policies on Academic Honesty, Academic Standing, Academic Concession, Final Exam , Grading Practices, Student Conduct, Technology Usage, and more can be found here: [https://corpuschristi.ca/current-students/#Policies](https://corpuschristi.ca/current-students/#Policies) In addition to the College Policies, this course also upholds the following policies and practices: * **Rule #1**: You must **own** your own work. Work that you submit (assignments, labs), you should be able to deeply understand and defend on your own, without needing to consult external material. For instance, at any time, the course instructor should be able to inquire you about your submitted work, and you should be able to give a satisfactory explanation. **The course instructor reserves the right to perform oral interviews or other spot checks to verify the originality of submitted student work.** * **Rule #2**: You are encouraged to collaborate together with other students, and use learning resources available to you (textbooks, notes, large language models, asking experts). You must acknowledge all learning resources that you use. * **Rule #3**: No collaboration of any kind is permitted during the midterms or during the final exam. * **Any violation of the rules listed above will result in a 0 on the work containing misconduct and will be reported, in writing, to the Academic Dean.** * NB: these policies substantially depart from the UBC Department of Computer Science’s Policy regarding collaboration on academic work, and in particular the CPSC 110 academic integrity policy. It’s highly recommended you be aware of their policies, in case you want to transfer into that Department. Attendance / Participation: * As per the college Final Exam policy, students who miss more than 25% of course lectures may be barred from writing the final exam. Accomodations: * Students with documented disabilities who may require accommodations must contact the [UBC Centre for Accessibility](https://students.ubc.ca/about-student-services/centre-for-accessibility) as soon as possible. Assignments: * To satisfy the requirements of this course, students will carry out weekly programming assignments and in-person lab assignments. Late/Missing Assignments: * A late assignment will be deducted 10% for every day the assignment is late. For instance, an assignment that is 2 days late and graded out of 100 points will be awarded a maximum of 80 points. * The lowest assignment and quiz will be dropped. Extensions: * As a general rule, extensions will almost never be granted. Instead, the lowest assignment and quiz will be dropped. Extensions on course work will only be granted due to illness or similar **extraordinary** circumstances. In such a case, a note signed by a physician stating the date and time of the visit to the doctor’s office may be required. **Any late work cannot be accepted three weeks after the end of term for any reason.** Missed Tests: * Only medical reasons justify make-up exams. In the case of the final exam, as per existing policy, the student must get in touch with the instructor within 48 hours of the missed final. Grading Scale ====================================================================================== Letter Grade | Numerical Equivalent | Grade Point | Grasp of Subject Matter | Other qualities expected of students --------------|----------------------|-------------|-------------------------|------------------------------------- **A range:** | Excellent: Student shows original thinking, analytic and synthetic ability, critical evaluations, broad knowledge base. A+ |90-100 |4.33 | Extraordinary | Strong evidence of original thought, of analytic and synthetic ability. Superior grasp of subject matter with sound and penetrating critical evaluations, which identify assumptions of those they study as well as their own; ; mastery of an extensive knowledge base. A |85-89 |4.0 | Excellent | Clear evidence of original thinking, of analytic and synthetic ability; Strong grasp of subject matter with sound critical evaluations; evidence of broad knowledge base. A- |80-84 |3.67 | Very, very good | Strong grasp of subject matter and sound critical assessments with appreciation for the larger context. **B range:** | Good: Student shows critical capacity and analytic ability, understanding of relevant issues, familiarity with the literature. B+ |76-79 |3.33 | Very good | Good critical capacity and analytic ability; reasonable understanding of relevant issues; good evidence of familiarity with literature. B |72-75 |3.0 | Good | Solid critical capacity and analytic ability; reasonable understanding of relevant issues; good evidence of familiarity with literature. B- |68-71 |2.67 | Satisfactory | Adequate critical capacity and analytic ability; reasonable understanding of relevant issues; evidence of familiarity with literature. **C range:** | Acceptable to minimum. C+ |64-67 |2.33 | Acceptable | Basic critical capacity and analytic ability; some understanding of relevant issues; some evidence of familiarity with literature. C |60-63 |2.0 | Barely Acceptable | Acceptable in expression but deficient in analysis or in structure. C- |55-59 |1.67 | Needs Improvement | Acceptable in expression but deficient in both analysis and in structure. D |50-54 |1.0 | Minimum Pass | Addresses the topic but significant deficiencies in expression, analysis and structure. **Failed:** | F |0-49 |0 | | Failure to meet the above criteria Student Evaluations of the Course ====================================================================================== During the last two weeks of class, the faculty lecturer will allow students time in class to evaluate the course. Course Schedule ====================================================================================== Week | Date | Course Content | Readings for each Class | Other Information -----|------|----------------|-------------------------|----------------- 1 | Fri 8 Sept 2023 | Course overview; Computing Science and Programming; Python’s building blocks: Variables, Values and Types; Mathematical Operations | - Pre-read [slides](https://docs.google.com/presentation/d/15VFE0lJSA4t_PHRbyopsNkJWtjGOEudF/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - Class policies (this syllabus!) - _TP_ Chapters 1 and 2 - Skim the [Python Resources](https://github.com/geoffwoollard/cpsc110/blob/main/Python%20Resources_CPSC%20110_%20Computation%2C%20programs%20and%20programming.pdf) | Lab 0 2 | Fri 15 Sept | Control Flow: Conditional statements (if/else/elif) | - Pre-read [slides](https://docs.google.com/presentation/d/13Qu252GbG7qHZKiQQbyZERn-LYxfjUGV/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapters 7.1-7.7 | - Lab 1 - Assignment 1 Due 3 | Fri 22 Sept | Control Flow: Iterative statements (while loops) | - Pre-read [slides](https://docs.google.com/presentation/d/1Re0SM7hDYSjVnTB1w7jDSXUUj31z3iYi/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapters 8.3–8.5 and 8.7–8.8 | - Lab 2 - Assignment 2 Due (Monday 25 Sept 2023) 4 | Fri 29 Sept | Functions; Modules | - Pre-read [slides](https://docs.google.com/presentation/d/18BsrhxK6icYzWEceQWy1aiXvkCCPZaiv/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapter 5 and 6 | - Lab 3 - Assignment 3 Due 5 | Fri 6 Oct | String Manipulation | - Pre-read [slides](https://docs.google.com/presentation/d/1MEZTpzKCLFnxJjuBJMfOzNXD2l-qMebd/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapters 9.1–9.9, 9.12–9.13 and 9.17–9.21 | (Midterm) Exam 1 6 | Fri 13 Oct | Lists; Tuples | - Pre-read [slides](https://docs.google.com/presentation/d/1CRoecDMP-Q33uG53iRNG4vK3RSH8U5rK/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapter 10 | - Lab 4 - Assignment 4 Due 7 | Fri 20 Oct | Control Flow: Iterative statements (for loops) | - Pre-read [slides](https://docs.google.com/presentation/d/16eM57bEdxCLJvcJJjX0ys05fpNBUZ3s_/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapters 4.4, 4.5, 8.2, 9.10, 9.11, 10.17 | - Lab 5 - Assignment 5 Due 8 | Fri 27 Oct | Recursion | - Pre-read [slides](https://docs.google.com/presentation/d/1HVQMTocMzbkPWhoZBgnVWIBhS8QhpoPN/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapters 16 | - Lab 6 (called Lab 7) - Assignment 6 Due 9 | Fri 3 Nov | Object Oriented Programming; Python Classes & Basic Data Structures | - Pre-read [slides](https://docs.google.com/presentation/d/10oVoKXM5yFuUtjqEUnfWd43IDetAXksG/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _TP_ Chapters 17 and 18 - _PS_ Chapter 4 | (Midterm) Exam 2 10 | Fri 10 Nov | Complexity Analysis | - Pre-read [slides](https://docs.google.com/presentation/d/1fQOia_oAt4Fv2zAQ25nV-PiL4C5oM9UW/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _PS_ Chapters 3 | - Lab 7 (called Lab 8) - Assignment 7 Due 11 | Fri 17 Nov | Searching and Sorting Algorithms | - Pre-read [slides](https://docs.google.com/presentation/d/1t8cxQG8A8FRt10LFNDwgvWCD1evtqKat/edit?usp=sharing&ouid=102189584168300595664&rtpof=true&sd=true) - _PS_ 6 | - Lab 8 (called Lab 9) 12 | Fri 24 Nov | Flex class | | - Lab 9 (called Lab 10) - Assignment 8 Due - Assignment 9 Due 13 | Fri 1 Dec | Review | [Slides](https://docs.google.com/presentation/d/1RvWl_sSnE7SWExYkqcJluVL4PNGUJ9y7PitI9aqHxWY/edit?usp=sharing) | - | Fri 8 Dec | Exam 3 (final) Appendix ====================================================================================== Recommendations for Related Courses at Corpus Christi College: : - CPSC 121 – Methods of Computation Credit Transferability: : - Consult http://www.bctransferguide.ca