Skip to content

Commit

Permalink
14th commit
Browse files Browse the repository at this point in the history
  • Loading branch information
umairsafdar768 committed Aug 22, 2024
1 parent 6b11851 commit 2701f54
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 43 deletions.
24 changes: 0 additions & 24 deletions additional_func.py

This file was deleted.

38 changes: 19 additions & 19 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,22 @@ def fibonacci(n):

# New functions added without test cases(2)

def celsius_to_fahrenheit(celsius):
"""
Convert Celsius to Fahrenheit
"""
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 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 celsius_to_fahrenheit(celsius):
# """
# Convert Celsius to Fahrenheit
# """
# 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 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 2701f54

Please sign in to comment.