Given a string, the task is check if every vowel is present or not. We consider a vowel to be present if it is present in upper case or lower case. i.e. ‘a’, ‘e’, ‘i’.’o’, ‘u’ or ‘A’, ‘E’, ‘I’, ‘O’, ‘U’ .
Input : geeksforgeeks Output : Not Accepted All vowels except 'o' are not present Input : ABeeIghiObhkUul Output : Accepted All vowels are present
Approach : Firstly, create set of vowels using
set() function. Check for each character of the string is vowel or not, if vowel then add into the set s. After coming out of the loop, check length of the set s, if length of set s is equal to the length of the vowels set then string is accepted otherwise not.
Below is the implementation :
Alternate Implementation :
Alternate Implementation 2.0 :
- Python Regex - Program to accept string starting with vowel
- Python Regex | Program to accept string ending with alphanumeric character
- Python program to count number of vowels using sets in given string
- Python program to find uncommon words from two Strings
- Python Program to Count number of binary strings without consecutive 1's
- Python | Alternate vowels and consonents in String
- Python | Count and display vowels in a string
- Python | Remove empty strings from list of strings
- Python | Tokenizing strings in list of strings
- PyQt5 QCalendarWidget - Getting accept drops property
- PyQt5 QSpinbox - How to enable accept drops
- PyQt5 QCalendarWidget - Setting accept drops property
- PyQt5 QSpinbox - Checking if accept drops is enabled or not
- PyQt5 QCalendarWidget - Getting Date Edit (Pop-Up) Accept Delay
- Python Program for Efficient program to print all prime factors of a given number
- Python | Interleaving two strings
- C strings conversion to Python
- Python Program for Program to calculate area of a Tetrahedron
- Python Program for Program to Print Matrix in Z form
- Python Program for Program to find area of a circle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.