fa
Feedback

فریب کلاهبرداران را نخورید! تل‌متریو این کانال‌ها را شناسایی و برچسب‌گذاری می‌کند 👉 برای مشاهده برچسب، اشتراک تهیه کنید

Free Python Course

Free Python Course

رفتن به کانال در Telegram
5 967
مشترکین
اطلاعاتی وجود ندارد24 ساعت
-357 روز
-22530 روز
آرشیو پست ها
CONTINUE STATEMENT WITH FOR LOOP We can use the continue statement with the for loop to skip the current iteration of the loo
CONTINUE STATEMENT WITH FOR LOOP We can use the continue statement with the for loop to skip the current iteration of the loop. Then the control of the program jumps to the next iteration. For example,

CONTINUE STATEMENT WITH FOR LOOP We can use the continue statement with the for loop to skip the current iteration of the loo
CONTINUE STATEMENT WITH FOR LOOP We can use the continue statement with the for loop to skip the current iteration of the loop. Then the control of the program jumps to the next iteration. For example,

WORKING OF CONTINUE STATEMENT
+1
WORKING OF CONTINUE STATEMENT

CONTINUE STATEMENT The continue statement is used to skip the current iteration of the loop and the control flow of the program goes to the next iteration. The syntax of the continue statement is: continue

BREAK STATEMENT WITH WHILE LOOP EXAMPLE We can also terminate the while loop using the break statement. For example,
BREAK STATEMENT WITH WHILE LOOP EXAMPLE We can also terminate the while loop using the break statement. For example,

BREAK STATEMENT WITH FOR LOOP EXAMPLE We can use the break statement with the for loop to terminate the loop when a certain c
BREAK STATEMENT WITH FOR LOOP EXAMPLE We can use the break statement with the for loop to terminate the loop when a certain condition is met. For example,

WROKING OF BREAK STATEMENT
WROKING OF BREAK STATEMENT

BREAK STATEMENT The break statement is used to terminate the loop immediately when it is encountered. The syntax of the break statement is: break

PASS STATEMENT EXAMPLE for letter in 'Rushi': if letter == 'n': pass print('This is pass block') print('Current Letter :', letter) print("Good bye!") Output: Current Letter : R Current Letter : u Current Letter : s This is pass block Current Letter : h Current Letter : i Good bye!

PASS STATEMENT SYNTAX Pass

PASS STATEMENT As the name suggests pass statement simply does nothing. The pass statement in Python is used when a statement is required syntactically but you do not want any command or code to execute. It is like null operation, as nothing will happen is it is executed. Pass statement can also be used for writing empty loops. Pass is also used for empty control statement, function and classes.

Output :
Output :

EXAMPLE 2 Printing multiplication table using Python nested for loops
EXAMPLE 2 Printing multiplication table using Python nested for loops

Output :
Output :

EXAMPLE 1
EXAMPLE 1

NESTED LOOP A nested loop is a loop inside a loop. The "inner loop" will be executed one time for each iteration of the "outer loop":

Output :
Output :

WHILE LOOP EXAMPLE 2 In this example, we will use the while loop for printing the multiplication table of a given number.
WHILE LOOP EXAMPLE 2 In this example, we will use the while loop for printing the multiplication table of a given number.

WHILE LOOP EXAMPLE 1 Print i as long as i is less than 6:
WHILE LOOP EXAMPLE 1 Print i as long as i is less than 6: