1 / 1

LOOP statement

If you want to learn a basic to advanced level in a PYTHON course and want to become an expert in that one, you need to attend the best advanced guidance online Training by Visualpath institute in Hyderabad. for more details contact @9704455959.

keerthana8
Download Presentation

LOOP statement

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LOOP statement Use the LOOP assertion to begin a LOOP...REPEAT software loop. A software loop is a sequence of statements that executes for a designated variety of repetitions or till designated situations are met. Use the WHILE clause to signify that the loop ought to execute time and again so long as the WHILE expression evaluates to true (1). When the WHILE expression evaluates to false (0), repetition of the loop stops, and software execution maintains with the assertion following the REPEAT assertion. Use the UNTIL clause to place contrary situations at the LOOP assertion. The UNTIL clause shows that the loop ought to execute time and again so long as the UNTIL expression evaluates to false (0). When the UNTIL expression evaluates to true (1), repetition of the loop stops, and software execution maintains with the assertion following the REPEAT assertion. If a WHILE or UNTIL expression evaluates to the null value, the circumstance is false. Expression also can include a conditional assertion. Any assertion that takes a THEN or an ELSE clause may be used as expression, however without the THEN or ELSE clause. When the conditional assertion could execute the ELSE clause, expression evaluates to false; while the conditional assertion could execute the THEN clause, expression evaluates to true. A LOCKED clause isn't supported on this context. You can use a couple of WHILE and UNTIL clauses in a LOOP...REPEAT loop. You also can nest LOOP...REPEAT loops. If a REPEAT assertion is encountered without a preceding LOOP assertion, a mistakes happens for the duration of compilation. Use the CONTINUE assertion inside LOOP...REPEAT to switch manipulate to the following generation of the loop from any factor with inside the loop. Use the EXIT assertion inside LOOP...REPEAT to terminate the loop from any factor in the loop. Although it's far feasible to go out the loop with the aid of using method apart from the conditional WHILE and UNTIL statements (for example, with the aid of using the usage of GOTO or GOSUB with inside the DO statements), it isn't recommended. Such a programming approach isn't consistent with proper dependent programming practice. For more information Click Here Contact us +91 9989971070

More Related