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.
It was a nice kata that I enjoyed a lot, except for the problem that there was an indication missing (candidates not mentioned in first place should be eliminated). I changed my code a lot because I thought I didn't handle the majority rule well for like 40 minutes before I checked the comments.
This comment is hidden because it contains spoiler information about the solution
Yes I used that. I searched around. My code can process half of the attempt cases well. It's just a problem when the user starts with his own level being different than -8 since I initialize it at -8. But I'll keep searching/trying.
You must use a
__init__
function in your class, so it creates a new instance with properties you will need to get updated. Make a research online about Python classes, it's not reasonable to explain everything about them here. Or maybe try to practice this on very basic katas to get familiar with classes.Hello. There is something I don't understand. I code with Python and I'm not used to classes yet. During some tests, the rank at the beginning is not -8 but another rank. Where is this information stored? Is it a variable? Where do we have to "search" it in the input you give to the machine? Since I don't really know what goes into the program, only what exits it, I'm at bit confused. I hope my question is clear enough.
No, it means you're trying to convert an empty string to an int.
You can use this:
print("newd: '" + newd + "'", flush = True)
to see the value ofnewd
.I having an error Value Error: invalid literal for int() with base 10: ' '
Does this mean the string I want to transform in int has some apostrophes in it ? Or some spaces ? It doesn't look like it but I can't test the code to know the output so I'm not sure.