Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
OP solved it, closing
Not a kata suggestion
That would require a repr() to get the value, if you simply want to do print(add(n)). The downside of that is it can only return a string type
Thanks, my bad. You rock.
You can? You are just missing
__eq__so the comparisons do not workWhy can't I use OOP (in Python) and make a class called Add() and use call() and repr()???
It perfectly satisfies the requirements with a factory function def Add() and is 100% legal.
Ridiculous.
Oh, i see, replacing operators is only for checking leading zeros. brilliant
I'm curious. What if the number is like "-?16" and replacing ? with "0" makes it "-016"?
Thanks for replying. I just deleted all my code in Kata and pasted it again from my IDE (0 changes made) and it passed.
I do not know what language you try, and I do not know your code, so I have really no way of checking why your solution fails.
My solution is working fine on VScode and i check all my individual functions, they all work fine but here in Codewars functions, these 4 tests always fail. Just what is going on???
(Python)
Answer for runes = '123?45*?=?' : -1 should equal 0
Answer for runes = '?*123?45=?' : -1 should equal 0
Answer for runes = '123?45+?=123?45' : -1 should equal 0
Answer for runes = '123?45-?=123?45' : -1 should equal 0
Even ChatGPT doesn't know what's going on. So either this is a Kata issue or some magic just doesn't allow me to pass this Kata. Since posting on Issues page normally will get shut down immediately :/ I'll post it here even though i believe this is pretty much a Kata issue
Totally forgot about substr
This is beautiful, and overlapping is naturally taken care of
Don't u need to update i after plateaus? Since you've already checked j more numbers after i?
This comment is hidden because it contains spoiler information about the solution
Loading more items...