## Hello and welcome

Hello and welcome to GopherCoders.com.

Do you want to learn to program a computer? If you answered YES you have come to the right website. Follow along with us and let us introduce you to the world of computer programming.

But before we start we want to set you a goal. Your goal is to be able to write a computer program to draw this.

This is a picture of the Mandelbrot set. It is special because it can only be drawn by a computer. Your goal is to write a computer program to draw it. If you follow along with the lessons you will learn how to do it.

Along the way you will solve lots of challenges, find out how fast astronauts fly and how to write secret messages.

## What you will learn

In the first lesson we want to introduce you to computer programming. We want to explain what a computer program is and why we need them. We will introduce you to some new words and explain what they mean.

You are going to find out

In the next lesson we will show you how to create your first program.

But first we have a challenge for you.

### Challenge

How many computer programming languages do you think there are?

So far computer scientists have created around 1500 different computer languages. Was that more or less than your guess? However only around 50 are actively used today.

## What is a computer program?

A computer program is a series of instructions that tell a computer how to complete a task. An example task is displaying this web page. A computer program called a web browser knows how to do this.

A computer program is special. The instructions in a computer program are very detailed and must be in the correct order. If not then computer will not perform the task correctly. The computer will always follow the instructions exactly, even if the sequence is wrong.

## What is a computer programming language?

A computer programming language is an artificial language that lets you give instructions to the computer.

## Why do we need a computer programming language?

We need computer languages because computers do understand the same languages as you. Computers only understand one language called binary. Binary is a sequence of ones and zeros.

You do not understand the binary language that the computer uses. We need a way to translate from a language that you understand to one that the computer understands. This is what a computer language does. It can be understood by you and after translation into binary by the computer.

## What is in a computer language made from?

A computer language is a combination of English words and mathematics. Someone, like you, who understands this language are called a computer programmer.

All computer programs are made from the same basic elements called statements. These are the instructions for the computer. There are different types of statements for:

• Variables and types. Computer programs need to remember things. Variables tell a computer what to remember. When a computer remembers a variable it puts it into its memory. The variables’ type tells the computer how much memory to use.
• Input and output. Think about moving your mouse. When you move the mouse it tells a computer program how far it has moved. This is input. The mouse puts its position into the program. When a program draws a picture on the screen it is called output. The picture comes out of the program. Output is the opposite.
• Selection. Selection statements are used by a computer program make a decision or a choice. Computer programs have to make lots of decisions when they run.
• Repetition. Repetition statements are used by a computer to repeat a sequence of instructions. Repetition statements help to make a program much shorter and easier to understand. They are often combined with selection statements.

Each statement type has its own pattern. We will show you different patterns in each lesson.

## What happens when a computer program runs?

When the computer program runs the statements in order The order of the is determined by two things:

• The current value of the variables.
• The logic or the decisions that the computer has made so far.

## How do I learn to program?

Learning to program requires two new skills.

• Learning the patterns for each statement type
• Learning how to use the patterns to solve problems.

You will learn both skills if you follow along with the lessons.

Now you know what a computer program is it is time for you to write your first program. We will do that in the next lesson.

## Hello and welcome

Hello and welcome to GopherCoders.com.

Do you want to learn to program a computer? If you answered YES you have come to the right website. Follow along with us and let us introduce you to the world of computer programming.