Introduction to Programming with Python - Python Programming for Beginners: Learn to Code - Learn Python - Python Tutorial - Object Oriented Programming Python (Software Development Training Book 1) by Vivian Bailey & Thomas Kirby

Introduction to Programming with Python - Python Programming for Beginners: Learn to Code - Learn Python - Python Tutorial - Object Oriented Programming Python (Software Development Training Book 1) by Vivian Bailey & Thomas Kirby
Author: Vivian Bailey & Thomas Kirby
Language: eng
Format: mobi, azw3, epub, pdf
Publisher: Software Engineering Publishing Co
Published: 2015-07-27

If-Statement

If-Else Statement

Let’s take them one by one.

BASIC CONDITIONS

These include all the arithmetic comparisons, such as less than (<), greater than (>), equal (=). For example:

3<4

3>2

t=5

t>7

All of the above have Boolean results i.e. they are either true or false. These conditions can be used to control the flow of the program using conditional statements.

However, not all arithmetic decision are transferred exactly to Python:

Greater than

>

>

Less than

<

<

Greater than or equal

≥

>=