Selection Statement ( if )

[Pages:10]The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Intro. To Computers (LNGG 1003)

Lab 4

Selection Statement ( if )

Eng. Ibraheem Lubbad

March 9, 2017

In this lab we will constructs program that allow statements to be optionally executed, depending on the selection execution.

Boolean Data Type and Operations:

The python values True and False are special inbuilt objects which is Boolean type. You can give variable the value directly or via Boolean expressions. Boolean expression: an expression that computes to True or false. It may contain relational (Comparison) operators and logical operators, the simplest Boolean expressions in Python are True and False.

Comparison Operators:

Operator

Description

==

Equal to

!=

Not equal to

Not equal to

>

Greater than

<

Less than

>=

Greater than or equal to

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download