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

If statements

How to use if statements in Python, with an example from image analysis

The last important building block of computer programs that we’ll introduce in this activity are if statements.

These are a way in which your program can make decisions based on specific criteria which you define. This video shows you how to use them, along with the complimentary else and elif to make decision branches in your programs.

This article is from the free online

Introduction to Image Analysis for Plant Phenotyping

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