Search This Blog

Saturday, 20 November 2021

Write a Python program to test whether a passed letter is a vowel or not.

Introduction:
This program test whether a passed letter is vowel or not.

PROGRAM:
def is_vowel(char):
    all_vowels = 'aeiou'
    return char in all_vowels
print(is_vowel('c'))
print(is_vowel('e'))				 

Output:  
True
False                                                                                                                                                                                                                                                                                                                                                                          

No comments:

Post a Comment

Sentiment Analyzer using NLP and Python - Practical Guide How to - Ai dev Surya

Unlocking Insights: NLP Project for Sentiment Analysis Natural Language Processing (NLP) is revolutionizing how computers understan...