Skip main navigation

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

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