Challenge: Loop It, Then Launch It!

In this challenge, you’ll practice using two different loops to control how your program runs.

Your task

  1. Use a for loop to print the numbers 1 through 10, one number per line.

  2. Use a while loop to create a countdown starting from 3.

  3. After the countdown finishes, print "Go!".

What to think about

  • A for loop is best when you know exactly how many times to repeat.

  • A while loop keeps running as long as a condition is true.

  • Make sure your countdown number changes each time, or the loop won’t stop.

Challenge: Loop It, Then Launch It!

In this challenge, you’ll practice using two different loops to control how your program runs.

Your task

  1. Use a for loop to print the numbers 1 through 10, one number per line.

  2. Use a while loop to create a countdown starting from 3.

  3. After the countdown finishes, print "Go!".

What to think about

  • A for loop is best when you know exactly how many times to repeat.

  • A while loop keeps running as long as a condition is true.

  • Make sure your countdown number changes each time, or the loop won’t stop.

Java
public class Main {
public static void main(String[] args) {
// Write your code here:
}
}