In this chapter, you learned how to create for() and while() loops. You also learned how to use break and continue to halt a loop immediately or skip the current loop iteration. In this activity, you are going to put all of those skills together to write a program with nested loops.

Be sure to review Lesson 2 in this chapter if you need help with nested loops.
Removing vowels from a wordActivity Requirements
In this activity, you are going to create a VowelEraser Python program that repeatedly asks the user for an input phrase. For each entered phrase, the program will print out all of the letters in the input except for vowels ("a", "e", "i", "o", "u"). The program continues prompting for a new phrase until the user enters "quit" or an empty string "".

Enter a phrase to process: hello
hll
Enter a phrase to process: quick
qck
Enter a phrase to process: run
rn
Enter a phrase to process: quit
Program complete
Additionally, if the program encounters an "x" character in any input phrase, no further characters will be printed for that phrase and the user will be prompted for the next input.

Enter a phrase to process: the quick brown fox jumped over the lazy dog
th qck brwn f
Enter a phrase to process: quit
Program complete
Create your Python program by completing the following steps:

Set up an outer while() loop that will always execute at least one time. Review Lesson 3 for a demonstration of how you can make this happen with "True" as the logical expression, in combination with break when you need to exit. Inside the outer while() loop:
Use input() to prompt the user to "Enter a phrase to process: ", storing the result in a variable (you choose the name).
If the user's input is equal to "quit" or "" (empty string), then halt the outer while() loop immediately.
Use an inner for() loop to iterate over each letter in your input phrase. Inside the inner for() loop:
If the letter is a vowel ("a", "e", "i", "o", or "u") then halt that loop iteration and return to the top of the for() loop to examine the next letter. Review Chapter 6, Lesson 3 if needed to recall how to use the or operator to help make complex decisions.
If the letter is "x", then halt the inner for() loop completely
Print the current letter to the screen on the same line. Remember you can use print(letter, end="") to keep everything on the same line, assuming letter holds the value you want to display.
After the inner for() loop is done, add a call to print() to move to the next line.
After the outer while() loop is done, display the message "Program complete".


Remember, in Python, indentation is important! All of the statements within a loop body should start in the same column. Your statements inside the inner loop will be indented further to the right than the statements in the outer loop.
Activity Results
Here are more example runs that demonstrate the expected output.

Enter a phrase to process: fe fi fo fum
f f f fm
Enter a phrase to process: scrabble
scrbbl
Enter a phrase to process: quirky
qrky
Enter a phrase to process: quit
Program complete
Enter a phrase to process: aeiou

Enter a phrase to process: xyz

Enter a phrase to process:
Program complete
When your program is complete and tested, submit it for grading!

Here is one possible solution to the activity:

```python
while True:
phrase = input("Enter a phrase to process: ")

if phrase == "quit" or phrase == "":
break

for letter in phrase:
if letter.lower() in "aeiou":
continue
elif letter == "x":
break
print(letter, end="")

print()

print("Program complete")
```

Note that in this solution, we use `letter.lower()` to convert the letter to lowercase before checking if it is a vowel. This allows us to handle both uppercase and lowercase vowels.