Pipey pipes
Visualize a program as machines and pipes sending data around.
Visualize a program as machines and pipes sending data around.
Teagan's Poet
Bonus lessons are optional.
Let's write a basic transaction processing system (TPS - not that one). A TPS tracks business events, like sales, inventory control... the regular stuff of business operations.
What is a list?
Hey, Ray! Wanna do some coding?
Who, me?
The others are better at this.
Maybe, maybe not. Watching you work will help the people reading this learn from you.
Fu Wei Hsu's Jojo
Often, variables are glue that sticks code chunks to together. Here's the code again:
Why is repeating code a problem?
I tried this, and got the error NameError: name 'rect_area' is not defined
.
Python (and most languages) have a way to wrap code up so it can be called repeatedly: functions.
A function is a piece of code with a name. Other code calls the function when it wants something done.
Let's take the name tag program we wrote at the beginning of the course.
Test user input to make sure it's valid.