Python Conditional Loops

  • 2 days ago
DEAR SIR/MADAM, I NEED THIS CHANNEL SPONSORSHIP FROM YOU TOO IF POSSIBLE https://www.dailymotion.com/mokkamodina19

DEAR SIR/MADAM, PLEASE ACCEPT AND PERMISSION DAILY MOTION, VIMEO AND RUMBLE.COM IN BANGLADESH.
Mohammad Ali Ashraf, [6/29/2024 7:07 PM]
https://ea.ebs.bankofchina.com/contactUs_en.html

ashrafm703@gmail.com IS MY EMAIL AND
DEAR SIR/MADAM, I NEED SUPPORT AND LOAN FROM CHINESE PRESIDENT AND GOVT.

DEAR SIR/MADAM, I WANT LOAN FROM YOU TO LEARN AND EARN MONEY BY THE SUPER AFFILIATE MARKETING OF JOHN CRESTANI.

DEAR SIR/MADAM.I AM FROM BANGLADESH MY PAYONEER ID IS mokkamodina19@gmail.com , IN ANY BANK ACCOUNTS OF BANGLADESH IS NOT SAFE FOR MY MONEY YOU KNOW THAT. WILL PAYONEER BANK ACCOUNTS OF MINE WILL BE SAFE FOR MY MONEY.? ALL OF MY ASSETS OR PROPERTIES ARE SEIZED BY FAKE WAYS IN BANGLADESH. I WANT TO LOAN FROM YOU TO BUY READYMADE HOUSES OR HOMES FOR ME. ALSO NEED LOANS FROM YOU WORK OR JOB VISA FOR USA/CANADA. ALSO NEED LOAN FROM YOU TO SETTLE AND STUDY IN THE USA/CANADA.. I WANT TO HANDOVER ALL OF MY ASSETS OR PROPERTIES WHICH ARE SEIZED BY FAKE WAYS TO THE USA/CANADA UNIVERSITIES.

https://www.aiddata.org/how-china-lends

mokkamodina19@gmail.com is my payoneer id. i want my youtube channel sponsorship from you.https://www.youtube.com/channel/UCrNbtmpYbyYMgmzD9aPtGMQ
and also help me to monetize my tiktok https://www.tiktok.com/@mohammadaliashr3


AFTER MONETIZATION I WANT THIS LINK SPONSORSHIP FROM YOU TOO. https://rutube.ru/channel/37901720/ ,,,,mokkamodina19@gmail.com is my payoneer id.
Transcript
00:00Welcome to this session. In this session we will be going about the conditional loops
00:15if nested if break statement all these kind of things we will be going into the conditional
00:20loops of pythons in this coming session. So, we will move to the python conditional loops.
00:26Next one is about the if statement it performs different computations or actions depending
00:31on whether a specific Boolean constraint evaluates to true or false ok. So, basically we need
00:39to assign whether a statement is true or false. So, the conditional statements are handled
00:44by if statement in python. Now, if statement is used for decision making
00:49operations and this is the syntax here if you are giving an expression you are giving
00:54a statement if that statement does not matches we give else and under statement. So, for
01:02that we have else condition and elif condition. Else condition when we have to judge one statement
01:09on the basis of other we use else condition. Elif is to correct the previous error made
01:16by the else condition ok. By using elif condition we are telling the program to print out the
01:22third condition or possibility when the other condition goes wrong or is incorrect. So,
01:30this is the if statement. Now, nested if statement this is an example
01:35where you are using lot of ifs ok. So, just see into the program here and we are using
01:41lot of if conditions you can see if country, if total you are asking you are using elif
01:47if total then again you are using elif then again you are asking if country if total.
01:52So, this is the nested if statement that means, you are giving lot of conditions if this if
01:58condition a does not happen condition b if condition b does not work out condition c
02:04condition d and you are giving elif also that means, if a is not working then choose b.
02:10So, this is how a nested if statement looks like.
02:14Now, we will come to the switch case statement. A switch statement is a multi way branch statement
02:22that compares the value of a variable to the value specified in the case statement. Now,
02:29python language usually does not have a switch statement, python uses a dictionary mapping
02:35ok to element switch case in python. So, always remember it does not have switch statement
02:41just like we use in you know java and c language, but here it has a dictionary mapping which
02:47helps us to implement the switch case in the python language.
02:52Now, python for the for loop and the while loops. Loops can execute a block of code number
03:02of times until a certain condition is met. For loop is used to iterate over elements
03:09of a sequence. It is often used when you have a piece of code which you want to repeat
03:15n number of times ok. So, this is an example here for people who are familiar with the
03:22languages for c of c and java you know how you use the if for conditions here ok.
03:29So, just the same way here in python we are using for x in the range of 2 is to 7. So,
03:35that iteration keeps on happening till the value of x is printed. Now, in the case of
03:41while loop, while loop is used to repeat a block of code ok. Instead of running the code
03:47block once it executes the block of code multiple times until the certain condition is satisfied.
03:57Now for that the expression is while expression we are giving a while expression and a statement
04:04multiple times. Now, this is how here I have given a comparison for you guys about the python
04:10loop and the code working code of for all the exercises. Now, for while loop this is how the
04:18code works ok. We are giving x is equal to 0 and you are asking it to implement 4 times ok till
04:24what x is equal to x plus 1 and you are asking it to iterate it accordingly until the condition
04:33is satisfied. Now, for loop here we have as in the same way you know you are giving for x in
04:40the range of 2 comma 7 and you are printing the value of x. Now, for loop in a string that is we
04:50have the months here for example, January, February, March till June and you are printing
04:55the for m in months you are asking them to print the value of m. Now, using the break statement
05:02this is how you use the break statement that means, once the condition has been satisfied or
05:08met you break the statement that means, you want to exit the loop. So, for x in the range of 10
05:14comma 20 the loop the if condition keeps on happening and then you are giving a break
05:20statement and asking them to print the value of x. Now, use of continuous statement it is the same
05:27way you are using a given giving a condition or a loop condition you are stating that if
05:32your statement is so and so continue and then you are asking to print the x.
05:37Now, enumerate function, enumerate function is also you can see how it is being used with this
05:43it. So, these codes can help us help you to identify how they vary from each other the while,
05:51the for, loop, break statement, continuous statement, enumerate statement. So, all these
05:56are the examples you can take these examples and run the code by yourself and you can find
06:02out the answers. Now, python break statement. So, the break statement takes care of terminating
06:09the loop in which it is used. If the break statement is used inside the nested loop the
06:16current loop is terminated and the flow will continue with the code followed that comes
06:22after the loop. So, here you can see the code you have a variable or a condition it is given
06:30to a condition and it is given to a body of a loop if it works out fine again it goes to the
06:37condition if not it goes to the break we give a break statement end of a loop if it is false it
06:45goes back against the condition or it exist the exit the loop. So, this is how the outline
06:52structure looks like for a break statement. Now, continuous statement the same thing is
06:59that you are giving a loop test as expression then you have a condition to continue the next
07:05iteration if the iteration turns out to be false you are executing the remaining part of the loop.
07:11No, if the condition satisfies you go to the true statement and you test the loop condition. So,
07:18this is how the flowchart of the continuous statement looks like. Now, python pass statement
07:27ok. So, this is another one that is being used in python. Python pass statement is used as a
07:31placeholder inside the loop functions class if statement that must that is meant to be implemented
07:39later ok we use the syntax that is called pass. A comment can also be added inside the body of
07:46the function or a class, but the interpreter ignores the comment and will throw an error.
07:52The pass statement can be used inside the body of a function or a class body during the execution
07:59the interpreter when it comes across the pass statement ignores and continues without giving
08:05any error. Now, when to use a break and continue statement? A break statement when used inside the
08:13loop will terminate the loop and exit. If used inside the nested loop it will break out from
08:21the current loop. Now, continuous statement will stop the current execution when used inside a loop
08:28and the control will go back to the start of the loop. The main difference here between the break
08:34and continue statement is that when break keyword is encountered it will exit the loop always
08:41remember when you give the word break it will exit the loop. In case of continue keyword the
08:48current iteration that is running will be stopped and it will proceed to the next iteration. So,
08:56this is the basic difference between the break and the continue statement. Now, python oops that
09:03is object oriented where you are considering the class objects inheritance and constructor with we
09:10have constructors with example. Now, a class first we will come into the class a class in python is
09:17logical grouping of data and function ok. It gives the freedom to create data structures that
09:24contains arbitrary content and hence it is easily accessible. So, this is how you define a python
09:32class ok. You have the syntax here is class you give a class name and this is how it looks like.
09:37To make an object of a class we are assigning a variable c is equal to my class so and so. Now,
09:44to call a method in a class you are using c dot method one or like you know c dot method two and
09:51you are giving and you are assigning a variable. So, this is how the general syntax of a class
09:58looks like. Now, inheritance now a class first we will come into the class a class in python
10:09is logical grouping of data and function ok. It give the continue statement. Now,
10:16python oops that is object oriented where you are considering the class objects inheritance
10:22and you are assigning a variable c is equal to my class. So, this is how you define a class.
10:29Now, inheritance now a class first we will come into the class a class in python is logical
10:32grouping of data and function ok. It gives the freedom to create data structures that
10:38contains arbitrary content and hence it is easily accessible. So, this is how you define a python
10:46class ok. You have the syntax here is class you give a class name and this is how it looks like.
10:52To make an object of a class we are assigning a variable c is equal to my class so and so. Now,
10:59to call a method in a class you are using c dot method one or like you know c dot method two and
11:06you are giving and you are assigning a variable. So, this is how the general syntax of a class
11:12looks like. Now, inheritance. Inheritance is a feature used in object oriented programming. It
11:19refers to defining a new class with less or no modification to an existing class. Now,
11:25a new class is called derived class from one which it inherit ok and it is called as the base.
11:32So, inheritance is basically you have a mother and a child. So, the inheritance capability. So,
11:39the same thing here is applied in the case of programming. The one from which it inherits is
11:44called as base. Now, python supports inheritance. It also supports multiple inheritance. Now,
11:51a class can inherit attributes behavior methods from other class or another sub classes or a
11:58higher of classes. So, these are just a basic things which you already know but there are
12:02certain differences in the case of python language. So, this is how the syntax for
12:08inheritance looks like. Now, coming to the constructors. Now, constructor is a class of
12:14function that instantiates an object to a predefined value ok. Now, it begins with a
12:21double underscore. So, basically the function here is underscore init underscore then the method ok.
12:28So, this is how the example works like. So, this is the example of the syntax used here for the
12:36constructors. So, with this you will understand how the class object inheritance and constructors
12:44work for python. So, these all needs to be coded up so that you can understand them better. Just
12:51the theoretical side is just your basic knowledge of what you can use, how to use and when to use,
12:57but basically the programming side is where you get to know how exactly the language works.
13:03So, with this I conclude this session. Thank you so much.