Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Update checkvowels.py
Browse files Browse the repository at this point in the history
Added docstrings
  • Loading branch information
Rishitha-VasiReddy authored Nov 25, 2023
1 parent ffca08a commit 2815484
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/vowels/checkvowels.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
def is_character_vowel(char):
"""
Check if a given character is a vowel.
Parameters:
- char (str): The character to be checked.
Returns:
- bool: True if the character is a vowel, False otherwise.
"""
vowels = "aeiouAEIOU"
return char in vowels

def main():
user_input = input("Enter a character: ")
"""
Main function to get user input and determine if the entered character is a vowel.
"""

if len(user_input) == 1 and user_input.isalpha():
if is_character_vowel(user_input):
Expand Down

0 comments on commit 2815484

Please sign in to comment.