Python Programming for Science & Engineering

Instructor: Dr. Nina Miolane

Affiliation: Geometric Intelligence Lab - UC Santa Barbara

Quarter: Fall 2025

Github: Link

Overview

This course represents a comprehensive foundation for Python programming in science and engineering. The lectures will present concepts from programming, linear algebra operations, statistics, and machine learning in Python. Students will actively engage with the technical materials with interactive course materials and hands-on sessions during the labs. The materials will be motivated by real-world datasets and scenarios ranging from brain imaging to housing market analytics.

This course is aimed to be:

  • Active: The classroom experience should be more like a conversation than a one-directional transmission of information.
  • Evidence-based: Frequent assessments will provide the instructors with ongoing information about student learning so that we can base the progression of the course on data rather than subjective impressions.

The goal of this course is to provide an understanding of the essential concepts and ”big ideas” of Python programming for science and engineering, as well as the skills to employ these concepts on real data to solve authentic real-world problems.

Prerequisites: Students should have a solid understanding of high school mathematics, specifically algebra and general calculus.

Instructors

  • Nina Miolane ninamiolane@ucsb.edu (Principal Instructor)
  • Adele Myers,
  • Louisa Cornelis
  • Francisco Acosta

Contacting staff

Questions. Please ask questions about class reading, lectures, and homework by posting online on Slack. Other students probably have the same question as you, so it will be helpful for everyone to see the responses. It is also the quickest way to get an answer. The office hours are another opportunity to ask your questions. Please avoid using emails to ask questions.

Admin. For administrative inquiries, please only email the instructor. Keep all emails short and to-the-point, use UCSB email, and use ECE 3 in the subject line. Avoid email attachments (e.g. doc and pdf files) if possible.

Feedback. We welcome your feedback regarding the course at any point. Please feel free to email us directly and use ECE 3 in the subject line. Alternatively, you can leaveanonymous feedback for the course staff by placing an anonymous note in Nina Miolane’s mailbox at Harold Frank Hall.

Outline

Unit 01: Welcome to Python

Unit 02: Computing with Data in Python

Unit 03: Summarizing Data in Python

Unit 04: Predicting from Data with Machine Learning in Python

Attendance

Lectures. Students are required to attend all the lectures. Students cannot enroll in other UCSB courses whose schedule is conflicting with ECE 3 schedule. If a student cannot attend all ECE 3 lectures, please drop this class.

Labs. Each student will participate in a biweekly two-hour long lab session with a TA. Students are required to attend all of their lab sessions. Please do not switch your registered sections otherwise we will not be able to confirm your attendance. If a student cannot attend all ECE 3 labs, please drop this class. The labs will be on the following weeks only:

  • Week 09/29 - 10/03
  • Week 10/06 - 10/10
  • Week 10/20 - 10/24
  • Week 11/03 - 11/07
  • Week 11/17 - 11/21

There are no labs the weeks of the quizzes. There are no labs and no lectures on Thanksgiving week. There are no labs on dead week.

Exam. Unless you have accommodations as determined by the university and approved by the instructor, you must take the exams at the date, time and location they are scheduled. Please check your course schedule and make sure that you have no conflicts with these exams. There will be no makeup exams. If you miss an exam, you will receive an F. If you cannot attend all ECE 3 exams, please drop this class.

Exception: Emergency. If you miss a lecture, lab, or exam due to an emergency, you should contact the instructor as soon as possible via email. Be prepared to bring official, written proof of a serious medical or other emergency that will be reported to UCSB.

Textbooks

The class goes over concepts from the textbooks:

  • Unit 01 Think Python by Downey.
  • Unit 02-03: Introduction to Applied Linear Algebra by Boyd & Vandenberghe.
  • Unit 04: Intro to Statistical Learning by James, Witten, Hastie, Tibshirani, Taylor.

The textbooks are freely available online.

The following textbooks are considered supplemental to classes:

  • Schaum's Outlines of Linear Algebra, by Seymour Lipschutz and Marc Lipson.
  • Introduction to Linear Algebra by Gilbert Strang, 5th Ed.
  • Introduction to Matrix Computations, by Margot Gerritsen.

We will not cover all topics in the books. We will cover a few topics not in the books.

Software

We use:

  • Python version 3.11 or higher as our programming language,
  • Jupyter notebooks to run Python interactively in a web browser.

Download Anaconda which will install everything you need to run Python 3.11+ and

Jupyter notebooks:

  • Anaconda: https://www.anaconda.com/download

The TAs will demo the setup process during the labs.

GitHub https://github.com/geometric-intelligence/ece3

The slides will be posted after each lecture on GitHub. You can download them in html or pdf format. Alternatively, you can directly run the code from the slides using the Binder link provided on this GitHub repository.

We mostly use GitHub to share class materials for two reasons. 1) Mastering GitHub is important when learning how to code, 2) Our lecture notes are in Python.

Grading

Your grade will be determined as follows:

  • Datacamp HW: 15% (completion)
  • Quizzes: 55%
  • Final: 25%
  • Constructive Participation in class and labs: 5%
  • Extra credit: up to +20% total

The grade scale will be curved so that approximately 1/3 of the students receive an

A/A-, 1/3 receive a B+/B/B-, and 1/3 receive a C+ or below. This will only be adjusted in the students favor: if, for example, more than 1/3 of the students master the material at an A level, then more than 1/3 of the students will receive As.

A+ grades and F grades. A+ grades may be awarded to the very best performing students in the class. The cutoff for A+ grades will be determined at the end of the course at the discretion of the instructor. If a student misses a homework or an exam, the student will receive an F. If a student cannot attend all ECE 3 exams, please drop this class.

Homework (Datacamp) https://www.datacamp.com/

Homework is done via Datacamp to provide hands-on learning with Python. They are due at 11:59 pm PST on Friday.

In order to connect to the class on Datacamp, follow this link: https://www.datacamp.com/groups/shared_links/8ba216c000c699219922c6a88a8e605481d2f6099d1a04a603176cb9f336e63e and connect with your @ucsb.edu email address.

All of your homework is already posted on datacamp. The homework is graded on completion. There is no makeup homework. Late homework will not be graded. If a homework is submitted late, the student will receive a F. There will be no exception to this rule.

Quizzes

Quizzes are designed to keep you on track with the course material and to give you regular opportunities to check your understanding. There will be one quiz per unit, except for the final unit, which concludes with the final exam. Quizzes take place in class, without ChatGPT or other online tools, and there are no labs during quiz weeks to give you time to focus. They are meant to be straightforward and align very closely with the class content, so if you keep up with lectures and practice, you will find them manageable. The quiz schedule is as follows:

  • Quiz 1: Monday Oct 13th
  • Quiz 2: Monday Oct 27th
  • Quiz 3: Monday Nov 10thYour lowest quiz score will be dropped in the calculation of your overall quiz grade.

There will be no mock up quiz. If you miss a quiz, you will receive a F grade.

Exams

  • There is no midterm exam for this class.
  • Final exam: Friday, December 12, 2025 12:00 PM - 3:00 PM. Location to be assigned during the quarter.

If you are late for the final exam, you will not be given extra time. If you miss the final exam, you will receive an F grade. There is no makeup final exam.

Code of conduct

You are expected to treat the course staff and your classmates with courtesy and

respect. This class should be a harassment-free learning experience for everyone

regardless of gender, gender identity, and expression, sexual orientation, disability,

physical appearance, body size, race, age, or religion. Harassment of any form will not be tolerated.

Reporting. If someone makes you or anyone else feel unsafe or unwelcome, please report it as soon as possible to the course staff. If you are not comfortable approaching the course staff, you may also contact the UCSB Well-being office: https://wellbeing.ucsb.edu/.

Academic Honesty. Cooperation has a limit! You should not share your code or answers directly with other students. Doing so does not help them; it just sets them up for trouble on exams. Feel free to discuss the problems with others beforehand, but not the solutions. Please complete your own work and keep it to yourself. Penalties for cheating are severe — they range from a zero grade for the assignment or exam up to dismissal from the University, for a second offense. Rather than copying someone else's work, ask for help. You are not alone in this course! We are here to help you succeed. If you invest the time to learn the material and complete the projects, you will not need to copy any answers.

Thank you and best wishes for the new Academic Year! 

Course Content

Week / Date Description Important Events
Module I: Welcome to Python (Weeks 1–2)
Week 1

Lectures 1 & 2: Variables, Data Types, Indexing, Slicing, Operators

 
Week 2

Lectures 3 & 4: Conditional statements, For Loops, While Loops, Functions

 
Module II: Computing with Data in Python (Weeks 3–4)
Week 3

Lectures 5 & 6: Vectors

 
Week 4

Lectures 7 & 8: Matrices

 
Module III: Summarizing Data in Python (Weeks 5–6)
Week 5

Lectures 9 & 10: Summarizing Continuous Data, Data Visualization

 
Week 6

Lectures 11 & 12: Comparing Two Variables, Input/Output

 
Module IV: Predicting from Data with Machine Learning in Python (Weeks 7–8)
Week 7

Lectures 13 & 14: Introduction to Machine Learning, Supervised and Unsupervised Learning

 
Week 8

Lectures 15 & 16: Clustering, Linear Regression

 
Module V: Review (Weeks 9–10)
Week 9

Lecture 17 & 18: Review First Half of the Class

 
Week 10

Lecture 19 & 20: Review Second Half of the Class