04: Mathematical Formulae

We’ve seen how Python can be used as a simple calculator. We have expressions for basic functions (multiplication, addition, etc.); but what if we wanted to do something more complex? Let’s take a look at Python’s math library. Setting Up “Math” To access the math library, you’ll first have to import the library to your current programming session. Use an import statement at the top of your new document. import math »

1D04 Labs: Common Mistakes

With the first major lab closing in, I thought it was appropriate to do a quick post on the most common mistakes I see during the lab. Hopefully knowing what can go wrong will help you avoid making the same mistakes during the major labs. Before I begin, I’d like to remind you all that you cannot ask TA’s any questions during the major lab. The only exception to this is questions clarifying »

03: Lists

Introduction Many programming tasks require the programmer to manipulate data in many ways. Often, we are given a finite set of data and must perform some sort of operation on it (arithmetic, sorting, etc.). Let’s look at one way to handle sets of information in Python. Let’s say we’re given a grocery list, and told to store it into a single variable, groceryList. Python has a built in data type called a »

02: The For Loop

Introduction In all areas of business, there are often times where we need to repeat a single task several times. Sometimes, we have to do something two or three times before we can really say we’re “done”. Even more often, however, are times when we must repeat ourselves hundreds or thousands of times! Let’s say we have a simple example, where we must start with the number 20 and must subtract one from »

1D04 Labs: Extra Help

By now, you’ve probably seen my other tutorials, which will follow the course content for 1D04 and review (in depth) many of the important concepts of Python programming. If you’re struggling with the course, or any concepts related to the Python programming language, there are many options for you to ensure that you succeed in this course, and as a developer. Here’s my list of resources. Avenue Discussions Avenue features a discussion »