mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 15:31:45 +00:00
Update server.py
This commit is contained in:
parent
388c7cfed4
commit
9759ef37c8
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user