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…