CodeTestValidate

No installations needed! Write Python directly in your browser and get instant feedback with our smart validation system.

Challenge # 8

Count Vowels in a String

Objective

Count how many vowels are present in a given string.

Instructions

  • You are given a string variable text.

  • Your task is to count how many vowels (a, e, i, o, u) appear in the string.

  • The comparison should be case-insensitive.

  • Print the total number of vowels in the string.

Constraints:
Do not use input(). • The string may contain both uppercase and lowercase letters.
Exemple IO

Input: text = "Hello World"

Output: 3

Input: text = "Python"

Output: 1

Input: text = "AEIOUaeiou"

Output: 10

Try It Online!

Output:

Validate Your Results

Get your code reviewed and validated to understand what you did right and where you can improve.

Previous challengeFind the Largest NumberNext challengeCelsius to Fahrenheit Converter
Loading...