Challenge 2: Character count

Suggested time: 30 minutes

A programmer wants to be able to count the number of vowels in text message. A vowel is any of the following characters: A, E, I, O or U.

The program must ask the user to type in a message with the prompt: "Type your message here: "

The program should then count all of the vowels in the message and display the results in a table as shown below:

Example program output 1
Example program output 2
Example program output 3

Using the file Q06.py below:

Amend the program to:

  • allow the user to type in a message using the prompt "Type your message here: "
  • count each vowel used
  • count all characters that are not vowels
  • display the results in a table as shown above
  • display the number of characters that are not vowels (shown as other characters in the examples above)
  • display the total number of characters in the message

Do not add any additional functionality

Use comments, whitespace and layout to make the program easier to read and understand

If this was a real question it would tell you to save your code as Q06_FINISHED.py but you might want to save your code so you can show your teacher or come back to it later by pressing Ctrl + S or clicking on the icon that looks like this:

Save / share icon in create.withcode.uk lets you save your code