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:

Juraj Juraska (jjuraska@ucsc.edu)
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

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: 15%

  • Online Reading Quizzes: 5%

  • 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

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

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

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.