Category Archives: Understanding Programming: A Primer

In this course you learn the essentials of programming. Brought to you by LearnToProgram.tv

Dealing with Data

Dealing With Data

This is Part V 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 article in the series we examined control structures– conditionals and loops— that are critical in most programming languages. They allow your programs to make decisions based on the criteria that you set as the developer. In this article we’re going to switch gears and examine data and how it’s stored. We’ll take a close look at three data structures: lists, tuples and dictionaries. You may not have given much thought to data before. The easiest way to conceptualize data is as organized information.

Continue reading

Conditionals and Loops

Conditionals and Loops

This is Part IV 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 article we took a close at variables.  We’re going to be using variables again in this lesson. First, we’ll be using variables to make decisions and execute branching within our program.  Then we’ll use variables to create loops which iterate through a portion of code a number of times.  The two concepts that we cover this month are found in just about every programming language.  So far, the programs we’ve written are all serial– they go through the same steps in the same order each time.  With the addition of conditionals and loops to our programming repertoire, you’re programs will be able to vary their path based on conditions you set.  Sounds like fun, right?

Continue reading

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