Loops

Pokemon EXP

Compare EXP for trainers with few and many pokemon.

A string input function

A nice thing about functions is you can build a cut-and-paste library to save yourself time. You can take code you've already written, wrap it in a function, and reuse it.

For example, when we were talking about validating strings, there was a loop like this that keeps asking until the user enters something.

Bonus: transactions

Teagan's Poet
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.