Program to Check Vowel or Consonant in Python

Program to check vowel or consonant in python. vowel or consonant program in a python programming language. this program will check and display whether the letter is vowel or consonant. To identify the letter is actually but to do the same thing in programming language is getting complex for beginners

def VOC(x):
if (x == 'a' or x == 'e' or x == 'i' or x == 'o' or x == 'u'):
print("Vowel")
else:
print("Consonant")
VOC('e')
VOC('d')

 

Output:

Vowel

Consonant

Vowel Definition

One of a type of speech sounds in which the oral component of the breath route is not obstructed and is not restricted enough to generate audible friction broadly: the syllable’s most prominent sound Phonetically, a vowel is any sound with no audible noise created by restriction in the vocal tract, while a consonant is any sound with audible noise produced by constriction in the vocal tract. However, this approach leads us to classify as vowels many sounds that in speech act as consonants.

Consonant Definition

A consonant is an alphabet letter that represents a fundamental spoken sound created by restricting the breath in the vocal tract. Consonants are all letters in the alphabet other than A, E, I, O, and U, which are called vowels. For example, the letter T is spoken with the front half of the mouth.

Consonants are sounds generated with the articulators close together. In other words, they are created with a close articulation, ranging from totally together to merely approximate. When consonants are far apart, they are considered to be voiceless; when they are close together and vibrating, they are said to be voiced.

def() Function in Python

The function header begins with the keyword def. A function name that is unique to the function. The rules for naming functions in Python are the same as those for writing identifiers. Parameters (arguments) are values that we pass to a function. It’s an annotation for a function.

More specifically, Python 2. x includes docstrings, which allow you to attach a metadata string to many types of objects. This is quite useful, therefore Python 3 expands on it by allowing you to attach metadata to functions that describes their parameters and return values.