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


Introduction

Write a Python program to test whether a passed letter is a vowel or not. I have used python 3.7 compiler for debugging purpose.


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. def is_vowel(char):
  2. all_vowels = 'aeiou'
  3. return char in all_vowels
  4. print(is_vowel('e'))
  5. print(is_vowel('z'))

Result

python language techstudy.org

     





Related Topics




Popular Posts