Welcome to ENGR 103 🐍

Introduction to Python for Engineers

Dr. Cheng Li  |  Oregon State University  |  Mon & Fri 9:00–9:50 AM

Intro Module

📌 What Is This Course?

ENGR 103 is a hands-on introduction to programming with Python, designed specifically for engineers. You don't need any prior coding experience — just curiosity and a willingness to make mistakes (that's literally how you learn to code).

Over 10 weeks, you'll go from writing your very first line of Python to building real programs that solve engineering problems: analyzing data, automating calculations, building simulations, and more. By the end, you'll have a skill that engineers use every single day.

The big idea: Programming is a tool for thinking. Once you can code, you can ask bigger questions, move faster, and build things that would be impossible by hand.

🐍 Why Python?

Python has become the dominant language in engineering, science, and data analysis — and for good reason. It's readable, powerful, and has an enormous ecosystem of libraries that let you do everything from visualizing sensor data to training machine learning models. The same language you learn in Week 1 is what researchers at NASA, Google, and CERN use every day.

More practically: Python is free, runs on any computer, and has a welcoming community. If you get stuck, someone on Stack Overflow has already been stuck in the same place.

🔬 Why I Teach This — A Note from Dr. Li

My research is in electromicrobiology — the study of microorganisms that can generate, conduct, or respond to electrical current. I work with microbial electrochemical systems: devices where bacteria literally breathe by pushing electrons onto electrodes, and we can harvest that electricity or use it to drive chemical reactions.

It sounds like science fiction. It's not. It's happening in lab reactors right now.

Here's the thing: none of that work is possible without computation. Every experiment generates data — voltages, currents, time series — and making sense of it requires code. I use Python to process electrochemical measurements, train machine learning models that predict microbial behavior, and deploy those models on tiny low-power hardware out in the field.

I'm not teaching you Python because it's a required course. I'm teaching it because it changed what I'm able to do as a scientist, and I want the same for you — regardless of whether you end up in bioengineering, civil, mechanical, or electrical.

✨ Cool Things Programming Makes Possible

Before we dive into syntax and variables, here are some examples of what programmers have built — to give you a sense of the space you're entering.

👻

Ghost in the Shell (1995 — the anime)

A landmark animated film that imagined a future where human consciousness can be uploaded, copied, and hacked. Its visual effects — including iconic "digital rain" and cyborg body schematics — were some of the first to use computer-generated imagery blended with traditional cel animation. The film raised questions about identity and embodiment in a digital world that programmers and ethicists still wrestle with today.

🧠

Neural Networks & Deep Learning

Programs loosely modeled on biological neurons that learn patterns from data. The same architecture powering image recognition in your phone camera and large language models like the one that may have helped write these very notes. A few hundred lines of Python is all it takes to train your first one.

🌊

Computational Fluid Dynamics

Engineers simulate how air flows over a wing, how water moves through a pipe, or how heat spreads through a circuit — all before cutting a single piece of metal. Python libraries like FEniCS make partial differential equations solvable on a laptop.

Microbial Fuel Cells + Machine Learning

In my own lab: bacteria oxidize organic matter and release electrons onto an electrode. We measure the resulting current over time — and Python scripts process those signals, detect anomalies, and predict system performance. The same pipeline, deployed on a Raspberry Pi the size of a credit card.

🚀

SpaceX Rocket Landing

The algorithms that guide a Falcon 9 booster back to a landing pad — in real time, under atmospheric turbulence — are written in code. Guidance, navigation, and control: all implemented in software running on embedded computers. That code had to be fast, correct, and reliable. That's engineering-grade programming.

🎮

Procedural World Generation

Games like Minecraft generate infinite terrain using algorithms — the same mathematical functions you'll learn in this course. A handful of well-chosen operations turn random numbers into mountains, rivers, and caves. The entire world is just math running in a loop.

"The computer is incredibly fast, accurate, and stupid. Man is unbelievably slow, inaccurate, and brilliant. The marriage of the two is a force beyond calculation."

— Leo Cherne (often misattributed, but still true)

🗺️ What to Expect

Each week has two lectures (Monday + Friday), a studio session, and a short assignment. Labs are collaborative; assignments are individual. Come ready to type.