Simple coding
Simple coding

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.


In this brief introduction to programming you have seen the fundamental building blocks that almost every programming language provides:

  • variables and assignment (=) to store and update data
  • arithmetic operators (+, -, *)
  • simple data types (strings and numbers, both integers and floating point)
  • data structures (lists)
  • sequence (one instruction per line)
  • iteration (for and while loops)
  • selection (if-else and if-elif-elif-...-else),
  • comparisons (>, <, ==, !=, >=, <=)
  • functions (len and sum for lists, int and float to convert strings to numbers)
  • input from the keyboard (input function)
  • output to the screen (print instruction)

Programming languages have to be automatically understood by a machine, so the syntax and grammar are much more constrained than English and other natural languages. Any spelling mistake, like writing flat instead of float or forgetting punctuation like commas and colons, or using the wrong data type, leads to an error.

You have also seen that programming involves writing clear and understandable code (e.g. by using comments and plain English names for variables and functions) to make it easier to change later, and testing it thoroughly.

Learning to program forces us to think clearly and rigorously when solving a problem, because the solution has to be described in very small and precise steps that even a machine can understand. Python makes it easy to write the code once we come up with a sufficiently detailed algorithm, but the thinking (still) has to be done by us.

Like learning any other skill, only practice makes perfect. We hope this course inspired you to learn more Python and to share your creations with friends and family.

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to University-level study, we offer two introductory routes to our qualifications. You could either choose to start with an Access module, or a module which allows you to count your previous learning towards an Open University qualification. Read our guide on Where to take your learning next for more information.

Not ready for formal University study? Then browse over 1000 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus371