CS150 Computing for the Sciences - Spring 2019

Course Page and Syllabus


When and Where
150A: MWF 10:10 AM – 11:00 AM
150B: MWF 11:15 AM – 12:05 PM
Mondays and Wednesdays in MBH 505; Fridays in MBH 411
Faculty
Professor Amy Briggs
MBH 640B
802-443-2255
briggs@middlebury.edu
Office Hours
Mon 12:30 - 2:00 PM, Tues 11:00 AM - 1:30 PM
and by appointment
Students
Class photos
Tutoring
Ruben Gilbert (rgilbert@middlebury.edu) (office hours)
Evening Tutoring (Sun.-Thurs.)
Frequent Links
Gradescope
Socrative: Section A, Section B
Python documentation
Announcements
  • Additional practice problems are posted in final review notes
  • Office hours on Wednesday 5/15 are 10am - noon
  • Final exam is self-scheduled (schedule here) in Twilight 110

Description

CS150 is an introduction to the field of Computer Science geared towards students interested in the sciences. No previous programming experience is assumed. At the completion of the course, you will:

  1. Be able to solve computational problems with procedural statements (assignment, operators, conditionals, loops), functions and objects
  2. Be able to design, implement and debug medium-sized programs in Python
  3. Have a working understanding of other tools used in scientific computing, e.g., R
  4. Be able to analyze and apply basic algorithmic techniques, such as recursion

If you are not sure if this is the right course for you, please come see me!

Schedule

PP: Practical Programming (2nd edition): An Introduction to Computer Science Using Python 3 [optional]
TP: Think Python: How to Think Like a Computer Scientist
CS4A: CS for All

Date Topics Reading (before class) Assignments
2/11 Introduction, expressions, variables (Socrative) PP: 1, 2 OR
TP: 1, 2, 5.1
Prelab 1 (notes)
2/13 Functions (Socrative) PP: 3.1-3.4,3.6-3.10,4.4 OR
TP: 3 except 3.2
Lab 1: Functions (notes)
2/15 Winter Carnival - no class
2/18 Documentation, constants, modules, randomness (Socrative) PP: 3.6, 6.1, 9.3 OR
TP: 2.7, 3.2, 4.2
Practice exercises 1 (solutions)
2/20 Loops (Socrative) PP: 9.1-9.5 OR
TP: 4.2, 8.3, 10.3
Prelab 2 (notes)
2/22 Quiz 1 (covering Python syntax, variables, comments, functions and basic for-loops) (practice, cheatsheet) Lab 2: Turtle Graphics (notes)
2/25 Strings plus loops (Socrative 1, Socrative 2) PP: 4.1-4.3, 9.2 OR
TP: 2.6, 8
Practice exercises 2 (solutions)
2/27 Strings plus objects (Socrative) PP: 7.1-7.3 OR
TP: 8
Prelab 3 (notes)
3/1 Quiz 2 (covering string literals, string operators, iterating through strings with for-loops, basic string methods) (practice, cheatsheet) Lab 3: Cryptography (notes)
3/4 Conditionals (Socrative 1, Socrative 2, Socrative 3) PP: 5 OR
TP: 5.2-5.7
Practice exercises 3 (solutions)
3/6 While-loops (Socrative) PP: 5, 9.6-9.8 OR
TP: 7.3-7.4
Prelab 4 (notes)
3/8 Quiz 3 (covering booleans, relational operators, conditional statements, while-loops) (practice, cheatsheet) Lab 4: Math whiz (notes)
3/11 Lists (Socrative) PP: 8.1-8.5, 8.7, 9.1 OR
TP: 10
Practice exercises 4 (solutions)
3/13 Lists, files PP: 8.1-8.5, 8.7-8.8, 10.1-10.3 OR
TP: 10, 14.2
Prelab 5 (notes)
3/15 Quiz 4 (covering lists, files) (practice, cheatsheet) Lab 5: Data for everyone (notes)
3/18 Dictionaries, Tuples (Socrative) PP: 11.1-11.3, 11.5 OR
TP: 11, 12
Practice exercises 5 (solutions)
3/20 Sets, Objects (Socrative), Midterm review, Midterm cheat-sheet PP: 11.1, 11.5, 14.1-14.3 OR
TP: 19.5, 15.1-15.2, 17.1-17.2
Sample Exam 1 (solutions)
Sample Exam 2 (solutions)
3/21 Midterm @ 7:30 PM in MBH 303 (A) and MBH 338 (B). You can bring your own letter-sized double-sided sheet of notes to the exam.
3/22 No class
3/25 Spring break - no class
3/27 Spring break - no class
3/29 Spring break - no class
4/1 References (Socrative) PP: 8.5 OR
TP: 10.10-10.12
Prelab 6 (notes)
Practice exercises 6 (solutions)
4/3 Quiz 5 (covering dictionaries, tuples, sets) (practice, cheatsheet) Lab 6: Hangman (notes)
4/5 Modules (Socrative 1, Socrative 2) PP: 6.1-6.2 OR
TP: 14.9
4/8 Command line, debugging, URLs PP: 10.1-10.5, 15 OR
TP: 14.1-14.4, Appendix A
Prelab 7 (notes)
Practice exercises 7 (solutions)
4/10 Quiz 6 (covering references, modules, optional parameters) (practice, cheatsheet) Lab 7: Weather Report (notes)
4/12 Student Research Symposium - no class
4/15 Data analysis w/ NumPy, pandas NumPy "quickstart", 10 minutes to pandas Practice exercises 8 (solutions)
4/17 Plotting w/ matplotLib (Socrative) Matplotlib tutorial Prelab 8 (notes)
4/19 Quiz 7 (covering NumPy) (practice, cheatsheet) Lab 8: Zipf's law (notes)
4/22 Intro to R (R script) Introduction to R, Python-to-R cheatsheet Practice exercises 9 (solutions)
4/24 Analysis and plotting in R (R script) Data visualization in R, R manuals Prelab 9
4/26 Quiz 8 (covering vector execution, R) (practice, cheatsheet) Lab 9: Zipf's law in R
4/29 Recursion TP: 5.8, 6.5-6.7 Practice exercises 10 (solutions)
5/1 More recursion Prelab 10
5/3 Quiz 9 (covering recursion) (practice, cheatsheet) Lab 10: Recursion (notes)
5/6 Complexity Analysis (Socrative) CS4A: 7.1-7.2.2 Test Project
Practice exercises 11 (solutions)
5/8 Searching and sorting (Socrative) PP: 12, 13 OR
CS4A: 5.5.1-5.5.4
5/10 Numeric representation (Socrative), Survey CS4A: 4.2
5/13 Final review, Final cheat sheet. I will provide the cheatsheet, and you can bring a separate letter-sized double-sided sheet of notes to the exam. Sample Final (solutions)
Test Project Due
5/15 Final Exam Self-Scheduled -- 9am, 2pm, 7pm; Twilight Hall 110
5/16 Final Exam Self-Scheduled -- 9am, 2pm, 7pm; Twilight Hall 110
5/17 Final Exam Self-Scheduled -- 9am, 2pm, 7pm; Twilight Hall 110
5/18 Final Exam Self-Scheduled -- 9am, 2pm; Twilight Hall 110
5/20 Final Exam Self-Scheduled -- 9am, 2pm; Twilight Hall 110

Resources

Textbooks

Think Python: How to Think Like a Computer Scientist (free!)
CS for All (free!)
Practical Programming (2nd edition): An Introduction to Computer Science Using Python 3 (optional, available here)

Software

Thonny IDE (free)

Coursework

Your semester grade will be calculated from the following components:

35%Assignments/Labs
10%Test Project
20%Midterm
25%Final
10%Weekly Quizzes

Labs: Almost every week we will have a lab assignment (and session). Lab sessions will typically occur on Friday. Before lab, you will be required to do some preliminary preparation (the “prelab”), which will be due at the beginning of the lab period. You will have time to work on the lab assignment during the Friday class, but completing the assignment will often require significant additional time. The lab assignments will typically be due on the next Tuesday night.

About 5-10% of the points for each lab assignment are designated “creativity” points, providing flexible challenges or opportunities for you to exercise your creativity. Note that these points are not extra credit; that is, in order to get a 100% score, you’ll have to earn these creativity points as well. Since the creativity points only count for about 7% of the total points it is still possible to earn an ‘A’ grade (93%) for your lab assignments without any creativity points.

Lab assignments are graded on correctness/completeness and design/style. The latter reflects that the code we write must be readable by humans as well as computers. Design/style is evaluated based on the following questions:

  1. Is the code written clearly, efficiently, elegantly and/or logically?
  2. Is the code readable, e.g. good use of whitespace, effectively commented, meaningful variable names, using language style conventions?

Test Project: There will be one test project towards the end of the semester. This is like an open-book take-home test, but for programming, and must be done independently.

Exams: There will be one midterm and one final. The midterm will be on the Thursday night before Spring break. The final exam will be self-scheduled during exam week.

Quizzes: Most Friday class sessions will start with a short quiz on the week’s material. This quiz is a low-stakes opportunity to check whether you have understood the week’s material. Following the quiz we will use the remaining time to work on the lab assignment for that week. The lowest quiz score for the semester will be automatically dropped.

If extenuating circumstances will cause you to miss an element of the course, e.g. a weekly quiz, let me know as soon as possible beforehand. When I know beforehand, we can make alternate arrangements.

Late Policy

Late assignments will not be accepted except under extenuating circumstances that have been communicated to me in advance. All submissions will be eligible for partial credit, so please make sure to turn in whatever you have completed before the deadline.

Honor Code

You are encouraged to discuss material from the lectures and textbooks with your classmates. However, the work that you turn in must be completed independently, unless an assignment is explicitly designated as one in which collaboration is permitted.

In particular, your work must not be based on information obtained from sources other than those approved for the course (i.e., the textbooks, web pages linked from the course web pages, and materials provided in lecture). An example of an impermissible “other source” is searching online for relevant code.

You should never copy another student’s code or solutions, exchange computer files, or share your code or solutions with anyone else in the class. You may, however, use any code that I provide to you or that comes from the textbooks, as long as you acknowledge the source. You are allowed to obtain help with your code from the course tutors. Alongside manual inspection, I may use automated tools for detecting software similarity.

For the weekly lab assignments: You should be designing and coding your lab solutions on your own, with help from the tutors and instructors if desired. You may help a classmate with syntactic errors, e.g., “Python is reporting a NameError”, but not logical errors, e.g., “My program doesn’t produce the correct result”. Should you be working with someone else, you may not provide them with suggested code nor may you copy their code into your program. You are encouraged to point out similar examples from the text or lecture notes.

For the test project: You should think of this as a take-home, open-book test. As such, you may read your textbook, class notes, and any other source approved by the instructor, but you may not consult other sources (e.g., looking for code online). You may not consult anyone other than the instructor. I encourage you to ask questions, but reserve the right not to answer, just as you would expect during an exam.

If you are working with others on an lab assignment, I suggest the following procedure: Spend as much time as you need working with others to understand the assignment. When you’re ready to start on your own take a break and then go back and write your programs without the notes or other materials you used while working with the others, including any programs you wrote with others outside of class assignments. This will help ensure that you follow both the letter and the spirit of the Honor Code.

If you are ever unsure about what constitutes acceptable collaboration, permitted resources, etc., please ask!

ADA

Students who have Letters of Accommodation in this class are encouraged to contact me as early in the semester as possible to ensure that such accommodations are implemented in a timely fashion. For those without Letters of Accommodation, assistance is available to eligible students through Student Accessibility Services. Please contact Jodi Litchfield or Michelle Audette, the ADA Coordinators, for more information: Michelle Audette can be reached at maudette@middlebury.edu or 802-443-2169 and Jodi Litchfield can be reached at litchfie@middlebury.edu or 802-443-5936. All discussions will remain confidential.


Acknowledgements

Thanks to Professor Michael Linderman for sharing course materials and infrastructure, and to Professors Pete Johnson, Daniel Scharstein, and Dave Kauchak for their prior contributions to developing the course.