Checking Vowels in String
Checking Vowels in String
def CheckVovels(var):
Vovels=['a','e','i','o','u','A','E','I','O','U']
count=0
for i in range(0,len(Vovels),1):
if Vovels[i]==var:
return True
else:
count=count+1
if count>0:
return False
text=input("Enter something about you:")
List=text.split();
for i in range(0,len(List),1):
if CheckVovels(List[i][0]):
List[i]=List[i]+"hey"
else:
temp1=List[i];
temp2=List[i][0];
temp3=temp1.replace(temp2,'');
List[i]=temp3
List[i]=List[i]+"hey"
print(List)
Comments
Post a Comment