Skip main navigation

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

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