Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion strings/count_vowels.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
def count_vowels(s: str) -> int:
"""Count the number of vowels in a given string.

Args:
s (str): Input string.

Returns:
int: Number of vowels in the string.
"""
Count the number of vowels in a given string.


:param s: Input string to count vowels in.

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:46: invalid-syntax: Expected an expression

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:37: invalid-syntax: Simple statements must be separated by newlines or semicolons

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:31: invalid-syntax: Simple statements must be separated by newlines or semicolons

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:28: invalid-syntax: Simple statements must be separated by newlines or semicolons

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:21: invalid-syntax: Simple statements must be separated by newlines or semicolons

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:12: invalid-syntax: Simple statements must be separated by newlines or semicolons

Check failure on line 12 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:5: invalid-syntax: Expected a statement
:return: Number of vowels in the input string.

Check failure on line 13 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:13:12: invalid-syntax: Expected a statement

Check failure on line 13 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:13:5: invalid-syntax: Expected a statement

Check failure on line 13 in strings/count_vowels.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (invalid-syntax)

strings/count_vowels.py:12:47: invalid-syntax: Expected an identifier

Examples:
>>> count_vowels("hello world")
Expand Down
Loading