Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #2181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

VolodymyrKaraniuk
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on implementing the count_occurrences function! 🎉 Your solution meets the task requirements by correctly counting the occurrences of a specified letter in a phrase, ensuring case insensitivity. While the functionality is spot on, consider renaming the loop variable letter_new to something like char or l for better clarity and consistency. Keep up the excellent work! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

# write your code here
pass
total = 0
for letter_new in phrase:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable letter_new is used here to iterate over the characters in phrase. However, using letter as the loop variable name would be more intuitive and consistent with the task of counting occurrences of letter in phrase. Consider renaming letter_new to char or simply l to avoid confusion with the letter parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants