Skip main navigation

New offer! Get 30% off one whole year of Unlimited learning. Subscribe for just £249.99 £174.99. New subscribers only. T&Cs apply

Find out more

Conditionals: How computers take decisions

Learn programming basics! Understand algorithms, propositional logic, and Python syntax. Create programs and grasp the basics of computer science.

In the video, we introduced the general concept of conditionals. This is a powerful concept in programming, and virtually all programming languages offer a way to create conditionals. They are also known as if statements (because they read “if something is true, then do this, else do something else”).

Conditionals simply allow a program to perform certain computations based on a certain condition. Therefore, it creates branches in our program, allowing our program to perform something depending on a condition. This is very powerful, as you will see in the next videos and exercises.

Python offers a way to write conditionals using if statements and in the next video we will explain how you can create conditionals in Python.

This article is from the free online

An Introduction to Programming Using Python

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now