From f4bac98f44596b0995942afa0e2357ba97a65ffc Mon Sep 17 00:00:00 2001 From: umairsafdar768 Date: Thu, 22 Aug 2024 15:12:45 +0500 Subject: [PATCH] 6th commit --- main.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/main.py b/main.py index 4d9fa27..81c3124 100644 --- a/main.py +++ b/main.py @@ -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] \ No newline at end of file +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] \ No newline at end of file