Rakesh have learn about vowel in school and is given an assignment by his teacher in…
- User
Rakesh have learn about vowel in school and is given an assignment by his teacher in which he has to list all vowel together from the word's given to him,but he is busy in watching cricket match and want your help to solve the assignment.
5 vowel (a,e,i,o,u) and you should also take care of uppercase vowel (A,E,I,O,U) INPUT
T testcase ( 1< t <10 )
then there will be T words
OUTPUT
List of all vowel present in the word
All vowel should be listed as they are found in the word
In case if there is no vowel you have to print "No"
SAMPLE INPUT 3 SdfgAe Out Get
SAMPLE OUTPUT Ae Ou e
Explanation
Here Testcase T value is 3 (T=3) which mean there will be three word to check for.
INPUT
3
SdfgAe
Out
Get
OUTPUT
Ae
Ou
e
Here in output order of vowels is same as they occur in word
Assistant
pythonT = int(input()) vowel_set = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'} for _ in range(T): word = input().strip() vowels = [char for char in word if char in vowel_set] print(''.join(vowels) if vowels else "No")
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.