Cogs 18: Introduction to Python

Syllabus Spring 2021 (to be updated during W1)


Welcome to Cogs 18!

The main goal of this course is to teach you introductory, hands-on skills for computer programming, specifically using the Python programming language. Programming concepts are taught in a way that fits within the cognitive science department, with relevant use cases. Our approach is to focus on programming as a tool and to get you started with the necessary background and basic skills required to get you reading and writing code. We aim to provide you with a strong foundation so that you can continue programming after you leave this class, applying the skills you learn here to your domain or topic of interest.


Course Information


Course Learning Objectives

By the end of this course, you will be able to:

Program at an introductory level in the Python programming language

Read basic Python programs, recognize the structures they use and explain how they work

Solve basic problems using programmatic solutions

Write and debug small Python programs

Execute Python programs on your local computer, using notebooks and the command line

Describe and implement best practices in Python, keeping in mind that programming is done by and for humans


Course Materials

All materials will be provided via the course websites and DataHub.

Software: Python >=3.6 (Anaconda distribution); Jupyter Notebooks

No required textbook; optional textbook: https://shanellis.github.io/pythonbook (currently under development by Prof. Shannon Ellis)

Detailed instruction for software installations/access will be listed on the course website and provided during Week 1 coding labs. All of the software is freely available for download.

Note: If you do not have consistent access to the technology needed to fully access remote instruction options, please use the form below to request a loaner laptop for the period during which you will be learning remotely due to the COVID-19 pandemic: https://eforms.ucsd.edu/view.php?id=490887. (For any issues that you may have, please email [email protected] and they will work to assist you.)


Course Format

Lectures will take place online at their scheduled time for those who are able to attend. As typically occurs in Cogs 18, students will be encouraged to follow along with the notes, will be given time to complete small coding challenges during lecture on their own, and will have the opportunity to see their classmates' thoughts (via Zoom polls) during lecture.

However, every lecture will also be recorded and shared so that students who are not able to or choose not to watch during the scheduled class time are still able to receive and digest all class materials. Lecture recordings will be available on Canvas in the Media Gallery by the end of the day after the live lecture is delivered.


Contact Information

In order to stay organized with a large class, it is important to communicate questions and information in a way that helps other students and respects the time of the instructional time (and you!). Please try not to wait until the last minute with questions about assignments, since the instructor and TAs may not be checking emails/discussion forums outside of normal working hours.

Dr. Bardolph is going to check in on Piazza only 2-3 times per week. You are welcome to post questions at any time, but please be aware that if you post late at night or on a weekend, you may not get a response until the next weekday.

If you have…

questions about course content, please post on Piazza so that other students can benefit from seeing the answers.

questions about logistics, please check the syllabus first. If you can't find the answer, ask a classmate. If still unsure, then post on Piazza.

a technical/specific assignment question, please come to office hours – in person discussion is usually the most productive for learning. If that is not possible, please post on Piazza following the guidelines in the Piazza section of the syllabus.

questions about a grade – post on Piazza in a private post to Instructors using the folder "regrades".

something interesting to share related to class, please participate in the Canvas discussion forums or come to office hours.

more in-depth questions/concerns not addressed here, please come to office hours or use Canvas to message your Instructor/TAs. The TA/IA team is your first point of contact and should be able to help with most student questions.

some feedback about the course you want to share anonymously - If you been offended by an example in class, really liked or really disliked a lesson, or wish there were something covered in class that wasn’t but would rather not share this publicly, etc., please fill out the anonymous form here.

Please use Canvas to message Dr. Bardolph. Expect up to a 2-day wait time for a response and please message again if you have not heard back within this time window.

To use Canvas message: Select the Inbox icon from the far-left menu of your Canvas homepage. Then select the "Compose a new message" icon from the top of the page.

My email address is listed here, but please do not use it for course-related communication: [email protected]. Emails sent to this address may be responded to very slowly or lost! Please use Canvas message instead for all course-related communication.


Grading Details and Policies

Assignments (40%)

There will be 5 assignments, each worth 8% of your grade. Assignments will be hands-on coding assignments. Assignments are to be completed individually and submitted on datahub. You will typically have about 1 week after release to complete each assignment. Assignments will be due on Mondays by 11:59 PM.

Late assignments will be accepted at 75% credit for 72 hours (3 days) after the assignment’s due date. Once the late deadline passes, assignments will be graded, feedback will be made available on datahub, and assignments will no longer be able to be submitted for credit.

You are permitted to work with classmates on assignments; however, you are personally responsible for understanding everything you turn in. While you may ask one another about assignments, you may not copy directly from a classmate. You may not post full assignments nor any part of any assignment on the Internet (i.e. Chegg or similar site). Evidence of cheating on an assignment will result (at minimum) in loss of a full letter grade in the course and may also require reporting in line with UCSD's Academic Integrity policy.


Coding Labs (16%)

Lab times will be used to get hands-on practice with the course material in a smaller group setting. As such, you will be provided with specific tutorials or activities each week that are focused on preparing you for the assignments. Across the quarter there will be 8 different coding labs (2% each).

Coding labs will be submitted in the same place as assignments using the same process; however, they will not be auto-graded for correctness. They will instead be spot-checked by instructional staff for concerted student effort. There are no late submissions for coding labs.

While you are encouraged to work on these during your assigned lab times in the Zoom session with instructional staff present (particularly if you’re struggling with the material!), you are not required to do so. To receive credit for a coding lab, you have to submit your attempted coding lab for that week by Wednesday at 11:59 PM each week. *Note: There are extended due dates for the first 2 coding labs to accommodate any students joining the class late.

Note: You should be signed up for the Coding lab that you are able to attend. However, if you are unable to attend your assigned Coding lab, you are free to attend the other Coding lab in a given week. Note that this policy could change if too many people are attending one Coding lab each week.


Midterm Exams (25%)

There will be a 24h time window during which students will be able to complete each midterm exam.

If you have a conflict with the scheduled exam period, please notify the instructor as soon as possible, and at a minimum one week before the scheduled exam (except in case of a documented emergency).

There will be two midterms (see course schedule. Each midterm is worth 12.5% of your grade. The exams will include varied question types and will be taken online.

During exams this quarter, you will be allowed to consult outside resources (your notes, Google, etc.); however, you must complete the exam on your own without any type of communication with other humans. For example, while you’re allowed to look something up on Google or look over your class notes, you may not ask anyone about a question or their thoughts regarding your answer. You may not text/communicate on any messaging apps about the exam with anyone. You may not take the exam while looking at someone else’s exam/computer. On exam days, there will be no office hours.

I take academic integrity seriously. I also trust and am confident that the vast majority of students care about their education enough to not engage in cheating. However, students should anticipate that if they are caught cheating on an exam, they will fail the class. They will also be reported in accordance with UCSD's Academic Integrity policy.


Final Project OR Exam (19%)

Students will choose whether they complete the final project OR the final exam, worth 19% of your final grade. Students get to choose which option is best for them but may only submit one and there are two limitations of choosing the final exam: 1) There is no opportunity for extra credit on the final exam and 2) the highest grade you can get if you choose the exam is an A. (To earn an A+, you must do the final project.)

Final Project You will learn more from the final project than you will from the final exam, but the project is more time-consuming and involved. We will discuss the details elsewhere; however, briefly, you will either (1) expand upon one of the class assignments adding original elements or (2) write original code for a project topic of your choosing. The goal of this project is to demonstrate that you can write good, well-documented code that solves the problem you’ve set out to solve.

Final Exam The final exam will be taken on the same platform and with the same time constraints as the midterm. Further details will be discussed in class.


Grade details

Note: Students must complete all midterm exams and complete the final project to receive a passing grade.

Grades will not be calculating using a curve and will not be rounded up.


Grading Scale


Regrade policy

If you think there is a mistake in your grade on an assignment, please post privately on Piazza to “Instructors” using the “regrades” tag within 72 hours. This post should include evidence of why you think your answer was correct and should point to the specific part of the assignment in question.

Note that points will not be rewarded if you fail to follow instructions. For example, if the instructions say to name the variable orange and you name it ornage (misspelled), you will not be rewarded credit upon regrade. This is because (1) following instructions and being detail-oriented is important and (2) there are hundreds of students taking the course this quarter and we need to respect the time of the grading team.


Schedule and Topics

The topics covered in this course are listed below along with an approximate schedule for when the topics will be covered. For more details, please see the Canvas modules and the schedule on Canvas (updated by the beginning of each week).


Important dates

April 23:       Midterm 1

May 10:        Midterm 2

May 31:        Memorial Day holiday – No class

June 11:       Final exam period (projects/final exam due by 11:59PM)


Piazza Guidelines¶

Piazza is an incredible resource for technical classes. It gives you a place to post questions and an opportunity to answer others’ questions. We do our very best as an instructional staff to answer each and every question in a timely manner. We also want to make sure this platform is being used to learn and not thwarting anyone’s education. To make all of this possible, there are a few rules we ask you all to follow:

1. Before posting your question, look at questions that have already been posted to avoid duplicates.

2. If posting about an assignment, your question title should have assignment number, question number, and 1-2 words about the question. (e.g., A1 Q1 Variable Naming)

3. **Never post an answer to or code for an assignment on a public post.** Pseudocode is encouraged for public posts. If you must include code for an assignment, make this post private (to “Instructors” only) on Piazza.

4. Your post must include not only your question/where you’re stuck, but also what you’ve already done to try to solve it so far and what resources (class notes, online URLs, etc.) you used to try to answer the question up to this point.

If you have been stuck on something for a while (>30min) and aren’t even really sure where to start - Programming can be frustrating and it may not always be obvious what is going wrong or why something isn’t working. That’s OK! If you are stuck, you can and should reach out for help, even if you aren’t exactly sure what your specific question is.

To determine when to reach out, consider the 2-hour rule. This rule states that if you are stuck, work on that problem for an hour. Then, take a 30 minute break and do something else. When you come back after your break, try for another 30 minutes or so to solve your problem. If you are still completely stuck, stop and contact us (office hours, post on Piazza). If you don’t have a specific question, include the information you have (what you’re stuck on, the code you’ve been trying (not publicly on Piazza), and/or the error messages you’ve been getting).


Resources for Support and Learning

Vice Chancellor – Student Affairs (VCSA)

Information for students who need access to computers: https://vcsa.ucsd.edu/news/covid-19-info.html#Access-to-Computers

Contact the VCSA: [email protected]

Up-to-date information about COVID-19 for UCSD students: https://vcsa.ucsd.edu/news/covid-19-info.html

Information Technology Services (ITS)

For questions about student accounts & passwords, software, etc.

http://blink.ucsd.edu/sponsor/ITS/services/index.html


Campus and Course Policies

Course Policies

Please be considerate and respectful of your classmates and instructors. Follow online etiquette by raising your hand to ask questions in Zoom, using Zoom chat to converse with the instructors and other students (keep comments brief and constructive), and maintaining a respectful tone in discussion forums.

Diversity is present in every class because students come from different backgrounds and bring different knowledge and experiences with them. I expect every student to be respectful of differences and I aim to create a welcoming, inclusive environment where every student has the resources they need to learn. Generating content (discussion posts, writing, etc.) that is derogatory toward another person or group will not be tolerated.

Finally, I recognize that this is a uniquely difficult time in history that may present unexpected challenges for students. My aim is to provide useful content and instruction in a manner that challenges students in the interest of education and growth. If any policy in the syllabus is hindering instead of helping your learning, please let me know.


Campus Policies

UC San Diego Principles of Community

UC San Diego Policy on Integrity of Scholarship

Religious Accommodation

Nondiscrimination and Harassment

UC San Diego Student Conduct Code