Loops Exercises

  < Previous  
  1. Write a while loop in Python that sums the numbers from 0 to 100.
  2. Write an infinite loop in Python.
  3. Write a for loop in Python that sums the numbers from 0 to 100.
  4. Write a for loop in Python that sums the numbers from 0 to 100 using the built-in range() function.
  5. Write a for loop in Python that displays the multiples of 3 between 1 and 100 using the built-in range() function.
  6. Write a for loop in Python that displays the numbers between 10 and 0 (inclusive) using the built-in range() function.
  7. Design a flowchart for a program that asks a user for input and guarantees that it's valid. Then, write Python code to do it.