## CMPS5P Introduction to Programming in Python

Lectures:

Mon+Wed 7:10-8:45pm, Classroom Unit 1 (Map)

Instructor:

Chris Schuster (Office Hours: Wed+Thu, 3:00-5:00pm, Engineering 2, 259)

Teaching Assistants:

Anirudh Challa (achalla@ucsc.edu)

Tutors:

No MSI tutoring available for this class.

Lab Sections: (in Soc Sci 1 135 - Map)

Mon 10:00 - 11:30am
Wed 1:00 - 2:30pm
Fri 1:30 - 3:00pm
Fri 3:00 - 4:30pm

Online Forum: https://piazza.com/ucsc/winter2017/cmps5p

Submissions: eCommons

Start Programming with Python (3rd edition)

Learning to Program Using Python (3rd Edition)

Think Python (2nd Edition)

Automate the Boring Stuff with 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

• 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

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

• Final Project: 15%

• Class Problems: 5%

• Midterm Exam: 15%

• 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.

### Programming Assignments

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

Late penalty: 20% per day late

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.

Projects will be submitted on eCommons.

### 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.

You should submit a project proposal through eCommons until Friday, March 3 and the final project itself until  Sunday, March 19.

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

• 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
• Short group meeting at the end of the quarter

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 eCommons. 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 quizzes or required attendance, there will be small programming problems that will be posted during the lectures with limited time to solve them in class. A correct submission is worth 1% of the grade, so it is sufficient to correctly solve and submit 5 different class problems in order to receive full credit for class problems.

### Midterm

There will be an in-class midterm exam on February 15, 7:10-8:45pm in Classroom Unit 1. It is a standard written test with enough space on the exam itself, so you do not need to bring additional paper or a blue book.

All assigned text book chapters of the reading quizzes 1 through 8 will be relevant for the midterm exam. 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.

The exam is closed notes, books, etc. - no laptops or phones 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.

### Final Exam

There will be a final exam on March 21 7:30-10:30pm in Classroom Unit 1. It is a standard written test with enough space on the exam itself, so you do not need to bring additional paper or a blue book.

All assigned text book chapters of the reading quizzes 1 through 15 will be relevant for the final exam with particular focus on the topics in the quizzes 1 through 12. You can see the topics we covered on the class schedule and the past reading quizzes on eCommons. In addition to multiple choice and fill-in-the-blank questions, the final exam will also include programming problems similar to the class problems.

The exam is closed notes, books, etc. - no laptops or phones 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.