For Loop

As it says in the header, FOR LOOP is used when we want to execute block of code statements again and again until a condition is met, we can use For loops. To be very specific, to iterate any collections, like a list, tuples, etc. we can use For loops. Example: Let’s understand FOR LoopContinue reading “For Loop”

While Loop

While Loops can be used if we need to execute the same set of statements again and again until a condition is met. For example, if we need to print a statement 5 times, we can use while loop. Let’s try to understand with an example: Example: Let’s try to print the value of variableContinue reading “While Loop”

If Statements

Well, if statement is common across many programming languages. When we have scenario, that an action should be performed only after a condition is satisfied, we can use if statement. For example, when a person is trying to login into his gmail account, he has to give his user name and password to validate andContinue reading “If Statements”

Design a site like this with WordPress.com
Get started