CMPS 5P Introduction to Programming in Python

Lectures:

Mon,Wed,Fri 2:40-3:45pm, Thimann Lecture Hall 3 (Map)

Instructor:

Christopher Schuster (Office Hours: Mon+Wed, 4:00-6:00pm, Engineering 2, 267)

Teaching Assistants:

Lucas Ferreira (lferreira@ucsc.edu)
Juraj Juraska (jjuraska@ucsc.edu)
Jo Mazeika (jmazeika@ucsc.edu)

Tutors:

Rishita Roy (riroy@ucsc.edu) (from LSS)
Gianluca A.R. Casapietra (gcasapie@ucsc.edu) (small group tutoring by appointment)
Owen Bosley (obosley@ucsc.edu) (individual tutoring by appointment)

Lab Sections: (in Baskin Engineering 109 - Map)

Tue 1:30 - 3:00pm
Tue 3:00 - 4:30pm
Thr 1:30 - 3:00pm
Thr 3:00 - 4:30pm

Assignments, Quizzes and Learning Materials: Canvas

Online Forum: Piazza

Text book: How to Think Like a Computer Scientist: Interactive Edition

Additional Recommended Reading:

Start Programming with Python (3rd edition)

Learning to Program Using Python (3rd Edition)

Think Python (2nd Edition)

Advanced Reading Material:

Automate the Boring Stuff with Python

Structure and Interpretation of Computer Programs in Python

Description

Introduces programming in Python, a high-level programming language used in the physical and social sciences and for Internet scripting. Students learn programming and documentation skills, as well as algorithmic problem-solving, coding, and debugging methodologies. Students write programs to solve sample problems drawn from a wide range of disciplines, primarily in the sciences. No prior programming experience is required, but a mathematics background at the pre-calculus level is assumed. This course and courses 5C and 5J cover similar concepts, but use different programming languages. Students may not receive credit for course 5P after receiving credit for course 11, 12A, or Computer Engineering 13.

Learning Objectives

  • Programming Skills

    • Expressions, Variables, Branching, Loops, Functions, Recursion, Strings, Lists, Dictionaries, Input/Output, Files

  • Documentation

    • Comments, Informal Specifications

  • Algorithmic Problem-Solving

    • Base cases, Edge cases, Data Structures

  • Debugging

    • Testing, Problem Localization, Logging, Step-through Debugging

  • Solving Problems in Science

    • Datasets (CSV, XML, JSON), Aggregation, Basic Statistics, Visualization

Grading

  • Programming Assignments: 40% (8x 5%)

  • Final Project: 20%

  • Online Reading Quizzes: 5%

  • Class Problems: 5%

  • Midterm Exam: 10%

  • Final Exam: 20%

To pass the class, you must at least:

  • Have more than 50% average on both your exams. A low grade on one exam can be countered by a good grade on the other exam.

  • Have more than 50% average on your programming assignments.

  • Work on and submit a final project.

Missing any of these requirements causes you to automatically fail the class. However, fulfilling all three requirements does not guarantee a passing grade. Instead, your grade is calculated based on the key above.

Programming Assignments

One assignment per week for the first 8 weeks (due Sundays 11:59pm)

Late penalty: 20% per day late (0 points after 5 days)

Each programmign assignment has two parts. The first part should be submitted on Canvas and the second part on Snakify.

Pair Programming is allowed and encouraged. You can pick your own pair programming partner or find a partner on Piazza. If you decide to do pair programming, any files you submit should start with the names of both pair programming partners.

If you need help with the programming assignments, please use the lab sections to get hands-on feedback, ask questions on the Piazza forums, contact the TAs, or visit the instructor during the office hours.

Final Project

There will be no programming assignments for the last two weeks of the class. Instead, you will work in small group of 2-5 on a medium-sized programming project. You are encouraged to define your own project as long as it is a Python programming project that involves concepts you learned in class and is feasible in two weeks.

An important part of the project is the communication with and about program code. (In particular, reading other people's code can sometimes be more difficult than writing it yourself.) Therefore, solo projects will not be accepted.

The following list illustrates potential project ideas but it is not exhaustive - you can also explore other project.

  • Algorithms
    • e.g. sorting a list with the MergeSort algorithm and measuring how many seconds it takes for long lists with thousands of random elements
  • Analyze or visualize a CSV data set
  • Games
    • e.g. Tic-Tac-Toe while using print() to draw crosses and circles, or a text adventure or flash card learning game
  • Graphical or Music applications
    • e.g. drawing fractals, editing or playing music in MIDI format or ABC notation
  • Web applications
    • e.g. a simple to-do list app, a guest book, blog or online poll

Some general advice for you project, especially for team work.

  • Always give constructive feedback
  • Communicate ideas and problems
  • Hard time bound (no late submissions)
  • Create timeline to measure progress
  • Risk management
    • Do high risk parts first, detect problems early
  • Staged development
    • Must-have, Should-have, Nice-to-have

Please follow the following guidelines for ensuring Academic Integrity:

  • Project should be new and original
    • No cut-and-paste from prior work
    • Not fulfilling requirements of other classes
  • Projects can always be continued after this course
  • As part of group, everyone should contribute
    • Notify me if others are not doing their fair share

Please submit your project proposal until Nov 22 on Canvas (including description and team members). Additionally, there will be a short group presentation at the end of the quarter. Finally, you should submit all of your code (including comments for documentation) until Dec 15. Late submissions will not be accepted.

Reading Assignments

All lectures will cover material from the textbook. You are required to read the assigned chapter or section in advance and answer questions as part of a short online quiz on Canvas. The quizzes consist mostly of multiple choice and fill-in-the-blank questions. The deadline is the start of the lecture. Late submissions will not be accepted.

Class Problems

Instead of in-class quizzes or required attendance, there will be small programming problems at the start of almost every lecture with limited time to solve these. A correct submission is worth 1% of the grade, so it is sufficient to correctly solve and submit 5 different class problems (out of about 20) in order to receive full credit for class problems.

Midterm Exam

There will be an in-class midterm exam on Monday, October 30, 2:40-3:45pm in Thimann Lecture Hall 3.

It is a standard written test with enough space on the exam itself, so you do not need to bring additional sheets of paper or a blue book.

The exam is closed notes, books, etc. - no laptops, phones, tablets, smart watches etc. are allowed. However, you can bring one (1) letter/A4 sized sheet of paper with hand-written notes on both sides. There are no restictions for the contents of that sheet but it has to be hand-written by yourself (do not photocopy other people's sheets).

All assigned text book chapters of the reading quizzes 1 through 11 will be relevant for the midterm exam, so all topics discussed until and including Wednesday, Oct 25. You can see the topics we covered on the class schedule. In addition to multiple choice and fill-in-the-blank questions, the midterm exam will also include programming problems similar to the class problems.

Final Exam

There will be a final exam on Wednesday, December 13, 12-3pm in Thimann Lecture Hall 3.

It is a standard written test with enough space on the exam itself, so you do not need to bring additional sheets of paper or a blue book.

The exam is closed notes, books, etc. - no laptops, phones, tablets, smart watches, etc. are allowed. However, you can bring one (1) letter/A4 sized sheet of paper with hand-written notes on both sides. There are no restictions for the contents of that sheet but it has to be hand-written by yourself (do not photocopy other people's sheets).

All assigned text book chapters of the reading quizzes 1 through 19 will be relevant for the midterm exam, so all topics discussed until and including Friday, Nov 17. You can see the topics we covered on the class schedule. In addition to multiple choice and fill-in-the-blank questions, the exam will also include programming problems similar to the class problems.

Academic Integrity

Any confirmed academic dishonesty including but not limited to copying programs or homeworks or cheating on exams, will result in a failing grade. Presenting work as your own when you did not actually do it is dishonest (academically, professionally and socially) and is called plagiarism. Always attribute (give credit for) anything done by someone else; then you cannot be guilty of plagiarism. However, it is not necessary to attribute materials provided by the instructor for the class, or contained in assigned reading for the class. Permitting another student to copy your work is also academic dishonesty, except as part of a group project. Students are expected to exercise reasonable caution that their own work is not copied improperly by another student. Please go to https://www.ue.ucsc.edu/academic_misconduct to see the full text of the University's policy on Academic Integrity.

Disability Accommodations

UC Santa Cruz is committed to creating an academic environment that supports its diverse student body. If you are a student with a disability who requires accommodations to achieve equal access in this course, please submit your Accommodation Authorization Letter from the Disability Resource Center (DRC) to me privately during my office hours or by appointment, preferably within the first two weeks of the quarter. At this time, I would also like us to discuss ways we can ensure your full participation in the course. I encourage all students who may benefit from learning more about DRC services to contact DRC by phone at 831-459-2089, or by email at drc@ucsc.edu.