About 185,000 results
Open links in new tab
  1. Python While Loops - W3Schools

    Python has two primitive loop commands: With the while loop we can execute a set of statements as long as a condition is true. Print i as long as i is less than 6: Note: remember to increment i, or else …

  2. While loop in Programming - GeeksforGeeks

    Mar 26, 2026 · A while loop is a control structure that repeatedly executes a block of code as long as a specified condition remains true. The condition is checked before each iteration, and the loop stops …

  3. JavaScript While Loop - W3Schools

    The do while loop is a variant of the while loop. This loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true.

  4. Python While Loop - GeeksforGeeks

    Jun 3, 2026 · While Loop is used to execute a block of statements repeatedly until a given condition is satisfied. When the condition becomes false, the line immediately after the loop in the program is …

  5. Python while Loop (With Examples) - Programiz

    In Python, we use the while loop to repeat a block of code until a certain condition is met.

  6. Loop (statement) - Wikipedia

    To avoid running into stack overflow errors for long loops, functional programming languages implement tail call optimisation, which allows the same stack frame to be used for each iteration of the loop, …

  7. Python while Loops: Repeating Tasks Conditionally

    Mar 3, 2025 · while is a Python keyword used to initiate a loop that repeats a block of code as long as a condition is true. A while loop works by evaluating a condition at the start of each iteration. If the …

  8. C while and do...while Loop - Programiz

    Loops are used in programming to execute a block of code repeatedly until a specified condition is met. In this tutorial, you will learn to create while and do...while loop in C programming with the help of …

  9. while - JavaScript | MDN - MDN Web Docs

    Jul 8, 2025 · The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is evaluated before executing the statement.

  10. Python While Loop Guide: Syntax & Examples - PyTutorial

    Feb 4, 2026 · Learn how to use the Python while loop for repetitive tasks with clear syntax explanations, practical examples, and tips to avoid infinite loops.