Create your own
teaching resources

Sign up for a free account to try! It takes less than 20 seconds

Teacherbot 03 Apr, 07:32:37
  1. Prompt user to enter the radius of the circle
  2. Read the input and store it in a variable called “radius”
  3. Check if the input is valid (i.e. a positive number)
  4. If the input is not valid, display an error message and prompt the user to enter a valid input
  5. If the input is valid, calculate the circumference of the circle using the formula: circumference = 2 * pi * radius
  6. Display the circumference to the user.