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

Create file_new_for_test #1923

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

REDonkey
Copy link

Create file_new_for_test

Create file_new_for_test
@REDonkey
Copy link
Author

Comment new

@REDonkey REDonkey closed this Oct 29, 2024
@REDonkey REDonkey reopened this Oct 29, 2024
Copy link
Contributor

@vsmutok vsmutok left a comment

Choose a reason for hiding this comment

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

Tests Failed!

please fix the code so that it passes all tests

@REDonkey REDonkey requested a review from vsmutok October 30, 2024 08:44
Copy link

@Dimosphen1 Dimosphen1 left a comment

Choose a reason for hiding this comment

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

Several changes were requested

app/main.py Outdated
Comment on lines 2 to 6
occurrences_count = 0
for letter_phrase in phrase.lower():
if letter_phrase == letter.lower():
occurrences_count += 1
return occurrences_count

Choose a reason for hiding this comment

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

Please, try to implement this function in one line using chaining and built-in string methods to avoid variable allocation and a loop

app/main.py Outdated
return occurrences_count


print(count_occurrences("letter", "t"))

Choose a reason for hiding this comment

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

Remove this line

Choose a reason for hiding this comment

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

Remove this file, there is no need to commit it

Copy link

@pavlopro pavlopro left a comment

Choose a reason for hiding this comment

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

GJ!

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.

4 participants