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 #1272

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

Solution #1272

wants to merge 2 commits into from

Conversation

yulia-pl
Copy link

@yulia-pl yulia-pl commented Oct 8, 2024

No description provided.

app/main.py Outdated
Comment on lines 36 to 39
total_food = 0
for animal in animals:
total_food += animal.feed()
return total_food
Copy link
Contributor

Choose a reason for hiding this comment

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

use sum method for that

app/main.py Outdated
Comment on lines 42 to 65
lion = Animal("Lion", 25)
lion.print_name()
food_points = lion.feed()
print(food_points)
print(lion.is_hungry)
print(lion.feed())

cat = Cat("Cat")
cat.print_name()
cat.feed()

cat2 = Cat("Cat", False)
print(cat2.feed())
cat2.catch_mouse()

dog = Dog("Dog")
dog.print_name()
dog.feed()

dog2 = Dog("Dog", False)
print(dog2.feed())
dog2.bring_slippers()

print(feed_animals([cat2, lion, dog]))
Copy link
Contributor

Choose a reason for hiding this comment

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

remove your own checking

Copy link

@Arsen-hrynevych Arsen-hrynevych left a comment

Choose a reason for hiding this comment

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

ok

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.

3 participants