Exercise Set 11

Exercise 1 of 5

Write the start of the loop to print the numbers 0 through 9.
# start of loop here
  print(number)

Your code

Exercise 2 of 5

Write the start of the loop to print the even numbers from 20 to 30.
# start of loop here
  print(i * 2)

Your code

Exercise 3 of 5

Write the start of the loop to print random numbers until it prints 5.
import random
number = 0
# start of loop here
  number = random.randint(0, 9)
  print(number)

Your code

Exercise 4 of 5

Write the start of the loop to run until the user enters the command "quit".
command = ""
# start of loop here
  command = input("Enter a command: ")

Your code

Exercise 5 of 5

Write the start of the loop to run forever.
# start of loop here
  print("Still going...")

Your code