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

caffeineBuzz won't ever print "Coffee" #3

Closed
vdalv opened this issue Aug 10, 2017 · 5 comments
Closed

caffeineBuzz won't ever print "Coffee" #3

vdalv opened this issue Aug 10, 2017 · 5 comments

Comments

@vdalv
Copy link
Contributor

vdalv commented Aug 10, 2017

Looking at the CaffeineScript.py file, I don't think that the return "Coffee" case will ever be reached.

This is due to the fact that there will never be a case where n % 4 == 0 is true, n % 3 == 0 is true, and n % 2 == 0 is false, because if a number is cleanly divisible by 4, it's always going to be cleanly divisible by 2.

I don't know the context of the exercise, so I'm not really sure what the expected behavior is. I would go exploring, but im too tired atm lol.

@kammitama5
Copy link
Owner

kammitama5 commented Aug 10, 2017

it's codewars...kata I've done that has passed. The katas aren't perfect...quite a few are buggy, but that makes them fun (well, some of them...some of them are unable to be completed because of test errors). These are best done if you code them yourself :) Generally, the ones I have uploaded have passed all test cases, but this is a personal repo of my solutions. You're welcome to try your alternative on the website codewars.com. You can also try some of the more difficult ones, or different languages, etc (I've trained in 8 thus far).

@vdalv
Copy link
Contributor Author

vdalv commented Aug 10, 2017

It's interesting that all the tests passed, do you mind posting the codewars link to this problem?

I'm not too interested in doing coding exercises, I just looked at some of your work, noticed some issues, and couldn't help posting my feedback.

@kammitama5
Copy link
Owner

kammitama5 commented Aug 10, 2017

You should be able to search to find the katas. I've tried not to name them exactly because I don't want people to just copy my solutions to gain points. Unfortunately would take me a while to link, because I've solved quite a few (I've tried not to name them the same as the name of the katas). If you can find a better solution, I encourage you by all means to start a repo and post such solutions (there are such repos all over GH). I've learned a lot by just solving and looking at the solutions..many of the solutions are just one or two lines long.
passed

@vdalv
Copy link
Contributor Author

vdalv commented Aug 10, 2017

I found the codewars link, and I can see why you'd code it the way you did.

Note: I don't mean to be a dick, although I am jealous of the amount of work you've done here.

@kammitama5
Copy link
Owner

Nah..you're not a dick Haha. I'd actually love to meet and follow your work, too. We're all in this together. I'm jealous of some of those people who are 1 dan, and their code is SO CLEAN!!! Aaaah..it's insane. I want to get that good..I have a looong way to go. It's nice to meet you..I hope we can be friends :)

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

No branches or pull requests

2 participants