In this episode, we're continuing our development of the 'Pokemon' example, where two creatures face off in a simple RPG reminiscent of the Game Boy classic.
First, we set off to simplify the code by way of functions -- and, while it doesn't work out exactly like I hoped, we still discuss, at length, how to define and use functions, including the importance of 'arguments' and 'return values'.
Next, we discuss a new data-type for our project: lists! Previously, we'd discussed integers, strings, and booleans, but lists are a powerful way to store, organize, and access information, and are useful for 'for' loops!
Finally, we briefly discuss how libraries are imported and used, and we bring in 'random' so that our former 'pokebot' can be upgraded to a fully-fledged Pokemon that fights back by choosing a random attack! This makes combat much more dangerous. T_T
If you're enjoying the series, come check us out live, and feel free to ask questions here in the comments or on the Discord server at http://vencabot.com ! Also check out this and other projects over at http://github.com/vencabot/intro_to_python .