Question: def count _ unique _ vowels ( string ) : vowels = { ' a ' , ' e ' , ' i ' ,

def count_unique_vowels(string):
vowels ={'a','e','i','o','u'}
unique_vowels = set()
for char in string.lower():
if char in vowels:
unique_vowels.add(char)
return len(unique_vowels)
# Test cases
print(count_unique_vowels("swEet")) # Output: 1
print(count_unique_vowels("AaaaeeE")) # Output: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!