That's cheating :(
It's rare, but if I can trivially handle a slightly broader set of inputs than required by the exercise, without compromising its ability to handle the requirements, I will. In real applications, unless you create a huge performance bottleneck, nobody will ever come after you for making something more robust than necessary. (Though I admit, if my heart really isn't in it, I've submitted plenty of code here that technically works, but would never cut it in serious code.)
should read instruction first!
Agreed. If there's an integer that's four digits long it would consider it a valid name. In my solution I added a try block to check that the string was not a four digit long integer.
what about integers?
Okay, thanks for that !
Great solution but it has me a little confused.
How does the last section of code convert the sum into binary ?
Ao invés de usar o format, você pode usar o print formatado para fica mais limpo... ex: f"palavra"
Can someone explain me the solution? :(
Then what would be the best practice? I note that your solution is pretty much the same thing with an extra step that isn't necasssary.
yay same solution, new to codewars
-5 and you save yourself 5 F characters ;)
you are crazy :)