Update server.py

This commit is contained in:
Namhyeon Go 2024-02-20 14:56:50 +09:00 committed by GitHub
parent 388c7cfed4
commit 9759ef37c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -462,7 +462,7 @@ def calculate_vowel_ratio(s):
return 0.0 return 0.0
# Count the number of vowels ('a', 'e', 'i', 'o', 'u') in the string. # Count the number of vowels ('a', 'e', 'i', 'o', 'u') in the string.
vowel_count = sum(1 for char in string if char.lower() in 'aeiou') vowel_count = sum(1 for char in s if char.lower() in 'aeiou')
# Calculate the ratio of vowels to the total length of the string. # Calculate the ratio of vowels to the total length of the string.
vowel_ratio = vowel_count / length vowel_ratio = vowel_count / length