Skip to content

Commit

Permalink
6th commit
Browse files Browse the repository at this point in the history
  • Loading branch information
umairsafdar768 committed Aug 22, 2024
1 parent 2ca4fbe commit f4bac98
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ def calculate_bmi(weight, height):
# """
# return (celsius * 9/5) + 32

# def count_vowels(string):
# """
# Count the number of vowels in a string
# """
# vowels = 'aeiouAEIOU'
# return sum(1 for char in string if char in vowels)
def count_vowels(string):
"""
Count the number of vowels in a string
"""
vowels = 'aeiouAEIOU'
return sum(1 for char in string if char in vowels)

# def is_palindrome(s):
# """
# Check if a string is a palindrome
# """
# s = ''.join(char.lower() for char in s if char.isalnum())
# return s == s[::-1]
def is_palindrome(s):
"""
Check if a string is a palindrome
"""
s = ''.join(char.lower() for char in s if char.isalnum())
return s == s[::-1]

0 comments on commit f4bac98

Please sign in to comment.