8 kyu
Barking mad
6,248 of 11,228niknmix
Loading description...
Fundamentals
Object-oriented Programming
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Hello, I'm getting this error:
Traceback (most recent call last): File "/workspace/default/tests.py", line 2, in from solution import snoopy, scoobydoo ImportError: cannot import name 'snoopy' from 'solution' (/workspace/default/solution.py)
Anyone has a clue on how to fix this? I didn't post my code, I don't know if it is allowed in the discussion section.
You removed the
snoopy
andscoobydoo
variables. You have to keep them, tests use them to verify your solution.It is not a kata issue, you need to fix your solution.
thank you very much hobovsky!!!
About how to post your code, read this: https://docs.codewars.com/training/troubleshooting#post-discourse
Thanks for this Kata!
Thanks for the Kata!)
Please, can one of the contributors add the tag
OBJECT-ORIENTED PROGRAMMING
, as the task includes OOP functionality?)done
Can you add OBJECT-ORIENTED PROGRAMMING tag?
I understood that only Snoopy can bark, and Scoobydoo can't bark ? So Snoopy.bark() returns "Woof" But Scoobydoo.bark() should return #undefined ? Here, both Snoopy and Scoobydoo can bark. I probably have missed something ?
What the description means is that you need to define a bark method so that
scoobydoo.bark()
is defined.Ruby 3.0 should be enabled.
Good introduction to methods in OOP for beginners :D
simple to
I've completed this kata, however I'm unable to view the solutions, says that I need to complete it first.
I took this kata as: You have an instance of a defined class. The instance has a method that its class doesn't and you want to teach that method to all other instances of that class. Defined the function in the class code shouldn't be a solution.
Description isn't multilanguage appropriate. Needs corrections (at least for python)
Nice beginner level object-oriented kata!
Woof Woof
This comment has been hidden.
still an issue.
It's even worse (at least in python): https://www.codewars.com/kata/reviews/553a86f91e039900d6000162/groups/64a5dff12f51b1000135f37c
You can obviously do this kata with a simple copy-paste. However, the intended solution (object methods) is definitely not for the 8 kyu level...
Hi, I've added a CoffeeScript translation, if you want to approve it, instructions for the approval process are here.
[Ruby] Needs test cases that the dogs have breeds.
Why? As long as they can bark ..
Translated it into Ruby, if you wish to approve it.
I am a bit confused. I think I have not completed the Kata as it was intended, but it still works.
The description mentioned something about prototype, but there is no "rule" set when the code is tested. Hope my implementation is not considered a cheat, because I didnt even understand the hidden intent of the kata.
Yeah I also think so, my code also worked but there was nothing about prototype in my code. I hope it's not considered cheating.
This is a copy of one of the lessons from Codecademy. I don't know who copied who, or if this is something "valid" or even "legal" so to speak. It's in the Objects II lesson from the javascript course, lesson 14/30, the only difference being it's not called scooby doo, but "buddy".
I'm new to python but if all dogs in the class of dogs have bark then shouldn't bark be in the class just like breed?
You have indeed to fix this code and that COULD be a way ;)
Nice kata. It might be worth adding a test case for Dog.bark() to make sure that the user has actually used the Object.prototype property to make the dogs bark.
This is a good kata for a quick self-confidence boost! +1 for the name of it! :D
I like your "quick self-confidence boost", think we should add it in the list of tags. ;D
+1 for "quick self-confidence boost" as Tag
+1
I would advise making more test cases to make sure all dogs can bark by default. I personally think this is a great lesson how it is on function prototypes and a good intro to objects. I think the instructions could be a little more concise, but the way it is worded now works only because you're only really giving scoobydoo the ability to bark. I feel like that is fundamental enough.
I think this could be a little clearer on what the user will need to do.
Would be better if there was a little more to it. Very simple as is
Ideally your test cases should verify that the Dog object prototype has a 'bark' function.