human
Check if a string can be converted to another string by replacing vowels and consonants | Function to check if the character is vowel or not.
Function that checks if a string can be converted to another string.
Find length of string.
If length is not same.
Iterate for every character.
If both vowel.
Both are consonants.
Driver Code"
Solution in Python:
 Write me a code to check if a string can be converted to another string by replacing vowels and consonants and the other steps required?
assistant
#Here is code to check if a string can be converted to another string by replacing vowels and consonants and the other steps required.
 def isVowel ( c ) :
	if ( c == ' a ' or c == ' e ' or c == ' i ' or c == ' o ' or c == ' u ' ) :
		return True
	return False
def checkPossibility ( s1 , s2 ) :
	l1 = len ( s1 )
	l2 = len ( s2 )
	if ( l1 != l2 ) :
		return False
	for i in range ( l1 ) :
		if ( isVowel ( s1 [ i ] ) and isVowel ( s2 [ i ] ) ) :
			continue
		elif ( ( isVowel ( s1 [ i ] ) ) == False and ( isVowel ( s2 [ i ] ) == False ) ) :
			continue
		else :
			return False
	return True
S1 , S2 = " abcgle " , " ezggli "
if ( checkPossibility ( S1 , S2 ) ) :
	print ( " Yes " )
else :
	print ( " No " )