• Write a program that calls the required function and provides the requested output. • Write a function that matches the specifications • Use for 0BJ in CONTAINER loop to go over characters in the string • Use if statements to compare the strings and characters • Try in statement to simplify a condition • Create and increment variables to count (use the accumulator pattern) • Write the print statement that allows the correct formatting of the output Instructions In English there are five vowel letters in the alphabet: A, E, I, 0, U. For the purposes of this exercise we won't count Y as a vowel. Write a program that takes input from the user and prints the number of vowels calling a function count_vowels. Write a function count_vowels takes a line of text as an argument and returns the total the number of vowels in the input. Make sure to account for both, uppercase or lowercase letters. Ex: If the input is: Listen, Mr. Adams, calm down. the output is: The text 'Listen, Mr. Adams, calm down. has 6 vowels.
• Write a program that calls the required function and provides the requested output. • Write a function that matches the specifications • Use for 0BJ in CONTAINER loop to go over characters in the string • Use if statements to compare the strings and characters • Try in statement to simplify a condition • Create and increment variables to count (use the accumulator pattern) • Write the print statement that allows the correct formatting of the output Instructions In English there are five vowel letters in the alphabet: A, E, I, 0, U. For the purposes of this exercise we won't count Y as a vowel. Write a program that takes input from the user and prints the number of vowels calling a function count_vowels. Write a function count_vowels takes a line of text as an argument and returns the total the number of vowels in the input. Make sure to account for both, uppercase or lowercase letters. Ex: If the input is: Listen, Mr. Adams, calm down. the output is: The text 'Listen, Mr. Adams, calm down. has 6 vowels.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question

Transcribed Image Text:### Educational Website Content
#### Programming Task: Counting Vowels in a String
**Instructions:**
- Write a program that calls the required function and provides the requested output.
- Write a function that matches the specifications.
- Use a `for OBJ in CONTAINER` loop to iterate over characters in the string.
- Use `if` statements to compare the strings and characters.
- Utilize the `in` statement to simplify condition checking.
- Create and increment variables to count (use the accumulator pattern).
- Write the `print` statement that allows the correct formatting of the output.
**Instructions:**
In English, there are five vowel letters in the alphabet: A, E, I, O, U. For this exercise, we won't count Y as a vowel.
Write a program that takes input from the user and prints the number of vowels by calling a function named `count_vowels`.
Write a function `count_vowels` that takes a line of text as an argument and returns the total number of vowels in the input. Ensure the function accounts for both uppercase and lowercase letters.
**Example:**
If the input is:
```
Listen, Mr. Adams, calm down.
```
The output should be:
```
The text 'Listen, Mr. Adams, calm down.' has 6 vowels.
```
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education