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

C17-Sharks-Raha #15

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

C17-Sharks-Raha #15

wants to merge 17 commits into from

Conversation

Ramora6627
Copy link

No description provided.

Copy link

@audreyandoy audreyandoy left a comment

Choose a reason for hiding this comment

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

Raha!

Your submission has completed all waves and passed all required tests. Your code was easy to read and utilized a lot of helper functions which made your code very neat! I also appreciated your docstrings too 😄

I have added comments to your project on ways to refactor, follow pep8 guidelines, and provided alternative approaches to the waves.

Overall, this project is well-deserving of a 🟢 green 🟢 ✨

Keep up the great work Raha!

Comment on lines +22 to +26
super().__init__(category = "Clothing", condition = condition, age = age)

def __str__(self):
return "The finest clothing you could wear."

Choose a reason for hiding this comment

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

👍 Good work in ensuring that all Clothing instances have a category of "Clothing" by passing the category value into the parent constructor.

Comment on lines +20 to +24
super().__init__(category = "Decor", condition = condition, age = age)

def __str__(self):
return "Something to decorate your space."

Choose a reason for hiding this comment

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

👍

Comment on lines +22 to +26
def __init__(self, condition = 0, age = 0):
super().__init__(category = "Electronics", condition = condition, age = age)

def __str__(self):
return "A gadget full of buttons and secrets."

Choose a reason for hiding this comment

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

👍

Comment on lines +27 to +47
self.category = category
self.condition = condition
self.age = age
def __str__(self):

return f"Hello World!"

def condition_description(self):
if 0 <= self.condition < 1:
return "Just trash it!"
elif 1 <= self.condition < 2:
return "Enjoy the last moments!"
elif 2 <= self.condition < 3:
return "As good as 30 year old wine!"
elif 3 <= self.condition < 4:
return "Better than the new one"
elif 4 <= self.condition <= 5:
return "No need to ask!"
else:
return False

Choose a reason for hiding this comment

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

👍 Great work! One minor suggestion:

  • Use 1 line of whitespace to separate function definitions from other logic. So in this case, you should have a space above def __str__(self):.

Comment on lines +71 to +73
inventory = []
self.inventory = inventory

Choose a reason for hiding this comment

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

Good work! We can also use a ternary to assign the value of self.inventory:

self.inventory = inventory if inventory else []

Comment on lines +79 to +90
assert result
assert len(tai.inventory) == 3
assert len(jesse.inventory) == 3
assert item_a in tai.inventory
assert item_b in tai.inventory
assert item_c not in tai.inventory
assert item_f in tai.inventory
assert item_c not in tai.inventory
assert item_d in jesse.inventory
assert item_e in jesse.inventory
assert item_f not in jesse.inventory
assert item_c in jesse.inventory

Choose a reason for hiding this comment

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

👍

Comment on lines +123 to +133
assert result
assert len(tai.inventory) == 3
assert len(jesse.inventory) == 3
assert item_a in tai.inventory
assert item_b in tai.inventory
assert item_f in tai.inventory
assert item_c not in tai.inventory
assert item_d in jesse.inventory
assert item_e in jesse.inventory
assert item_f not in jesse.inventory
assert item_c in jesse.inventory

Choose a reason for hiding this comment

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

👍

Comment on lines +218 to +232
assert result == False
assert len(tai.inventory) == 3
assert len(jesse.inventory) == 3
assert item_a in tai.inventory
assert item_b in tai.inventory
assert item_c in tai.inventory
assert item_d not in tai.inventory
assert item_e not in tai.inventory
assert item_f not in tai.inventory
assert item_d in jesse.inventory
assert item_e in jesse.inventory
assert item_f in jesse.inventory
assert item_a not in jesse.inventory
assert item_b not in jesse.inventory
assert item_c not in jesse.inventory

Choose a reason for hiding this comment

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

👍

Comment on lines +265 to +279
assert result == False
assert len(tai.inventory) == 3
assert len(jesse.inventory) == 3
assert item_a in tai.inventory
assert item_b in tai.inventory
assert item_c in tai.inventory
assert item_d not in tai.inventory
assert item_e not in tai.inventory
assert item_f not in tai.inventory
assert item_d in jesse.inventory
assert item_e in jesse.inventory
assert item_f in jesse.inventory
assert item_a not in jesse.inventory
assert item_b not in jesse.inventory
assert item_c not in jesse.inventory

Choose a reason for hiding this comment

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

👍

def condition_description(self):
if 0 <= self.condition < 1:
return "Just trash it!"

Choose a reason for hiding this comment

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

Love this description 😆🗑️

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