human
Program to accept a Strings which contains all the Vowels | Function to to check that a string contains all vowels.
Hash Array of size 5 such that the index 0 , 1 , 2 , 3 and 4 represent the vowels a , e , i , o and u.
Loop the string to mark the vowels which are present.
Loop to check if there is any vowel which is not present in the string.
Function to to check that a string contains all vowels.
Driver Code"
How can the above be solved in Python?
assistant
#Here is code to program to accept a Strings which contains all the Vowels and the other steps required.
 def checkIfAllVowels ( string ) :
	hash = [ 0 ] * 5 ;
	for i in range ( len ( string ) ) :
		if ( string [ i ] == ' A ' or string [ i ] == ' a ' ) :
			hash [ 0 ] = 1 ;
		elif ( string [ i ] == ' E ' or string [ i ] == ' e ' ) :
			hash [ 1 ] = 1 ;
		elif ( string [ i ] == ' I ' or string [ i ] == ' i ' ) :
			hash [ 2 ] = 1 ;
		elif ( string [ i ] == ' O ' or string [ i ] == ' o ' ) :
			hash [ 3 ] = 1 ;
		elif ( string [ i ] == ' U ' or string [ i ] == ' u ' ) :
			hash [ 4 ] = 1 ;
	for i in range ( 5 ) :
		if ( hash [ i ] == 0 ) :
			return 1 ;
	return 0 ;
def checkIfAllVowelsArePresent ( string ) :
	if ( checkIfAllVowels ( string ) ) :
		print ( " Not ▁ Accepted " ) ;
	else :
		print ( " Accepted " ) ;
if __name__ == " _ _ main _ _ " :
	string = " aeioubc " ;
	checkIfAllVowelsArePresent ( string ) ;