Category Archives: Courses

Variables Python

Understanding Variables

This is Part III of Understanding Programming: A Primer, an exclusive series for EDUKWEST designed to teach you the basics of computer programming.  This series is designed to be a tutorial and you will be the most successful if you work through the tutorial with your text editor open. Key in the code as it appears and try to make it run correctly yourself. You’ll find that by the end of this series, you’ll be able to develop simple programs and understand the process of computer programming.

In the last lesson, we looked at input and output, which, of course, allow us to get data into and out of our Python program.  In this lesson we’ll take a closer look at one of the most important aspects of programming–variables.  You may not equate this to computer programming, but you’ve likely been using variables since high school as you took courses in Algebra, Chemistry and Physics.  In classic “solve for x” problems, “x” is a variable.

Let’s first take a look at how the Python programming environment handles variables.

Continue reading

Figure 1.4

Input and Output

This is Part II of Understanding Programming: A Primer, an exclusive series for EDUKWEST designed to teach you the basics of computer programming. This series is designed to be a tutorial and you will be the most successful if you work through the tutorial with your text editor open. Key in the code as it appears and try to make it run correctly yourself. You’ll find that by the end of this series, you’ll be able to develop simple programs and understand the process of computer programming.

In this tutorial we’re going to look more closely at input and output, which are, perhaps, the two most critical concepts in any program. In the previous article we looked closely at the output that can be produced with the print command. With print we were able to output three types of data to the command line screen:  strings, integers and floating point numbers. The programs we wrote, however, how no capacity to take input and process data. In this article we’re going to look closely at two types of input. Input statements will allows us to programmatically request input from the user. We’ll then use command line parameters to provide inputs to our program.

As we look at output, we’ll also look at directing our output to a file instead of back to the command line.

So now it’s time to put on your favorite programming music (I suggest The Cure), open your nano or vi text editor and let’s start coding…

Continue reading

Development Environment

Writing Your First Program

This is Part I of Understanding Programming: A Primer, an exclusive series for EDUKWEST designed to teach you the basics of computer programming.  This series is designed to be a tutorial and you will be the most successful if you work through the tutorial with your text editor open. Key in the code as it appears and try to make it run correctly yourself. You’ll find that by the end of this series, you’ll be able to develop simple programs and understand the process of computer programming.

Before we write any programs, we have to get your development environment set up.  I won’t make you buy anything (with the exception of one $2.99 program, if you want to run this all on an iPad), and you may even have a few options to choose from.

Continue reading

Writing your First Program

Understanding Programming: A Primer

Understanding Programming: A Primer is an exclusive series for EDUKWEST designed to teach you the basics of computer programming.  This series is designed to be a tutorial and you will be the most successful if you work through the tutorial with your text editor open. Key in the code as it appears and try to make it run correctly yourself.  You’ll find that by the end of this series, you’ll be able to develop simple programs and understand the process of computer programming.

Welcome.  If this is your first time programming, congratulations! You’re about to start an adventure that most find very rewarding. If you are trying to learn after a previous abortive attempt, you deserve recognition as well.  Tackling programming isn’t always easy–but it’s not outside the grasp of the average person, either.

Continue reading