Python Programming Language: Computer Applications
Python Programming Language | IF Statements | ELSE Statement | ELIF Statement | Nested IF Statement | Lecture 4
Review:
In the previous two videos, we had seen
Primary Data Types
• Integers
• Decimal Number (floats)
• Strings
• Booleans
• Lists
In this video, we shall see “IF Statement” along with its associates ELSE Statement ELIF Statement
IF Statements –
• IF statements are very important and used almost in every program
• It is used to tell the program whether to use a particular set of code or not to use them. In precise it is used to tell when to use a certain set of code.
• Here “Spyder” which is one of the products which came with “Anaconda” will be used
Illustration of IF Statement using Spyder
Illustration of ELSE & ELIF Statement
Nested IF Statement –
If you have an IF Statement within another IF Statement then it is called Nested IF Statement
Nested IF Statements are important and are used under various conditions
Examples of IF Statement, IF ELSE Statement, Nested IF Statement, ELIF Statement:
Program to find if a given number is even or odd using IF Statement –
Program to find if a number is present or not from a given set of numbers using IF Statement –
Program to find if a List is empty or not using IF Statement –
Video by Edupedia World (www.edupediaworld.com), Free Online Education;
Download our App : https://goo.gl/1b6LBg
Click here https://goo.gl/HjNegN to watch more videos on Python Programming Language- Complete Tutorial;
All Rights Reserved.