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.
Very clever;
d*mn, I don't know int can be inherted
How does repr have anything to do with this kata?
omg
You cannot get that behaviour wihout using any classes or objects in python
+1
Thank you :)
thank you so much for explaining it !
There's a difference between the normal
if: else:
statement in Python and this. This is specifically what is called a "ternary operator", and it's a different syntax for a different operation (although it does similar things.https://www.geeksforgeeks.org/ternary-operator-in-python/
It's a bit of a shame that Python uses the same tokens
if
andelse
for both the conditional statement and the ternary operator - most languages don't, and it does make it confusing.i dont understand how you can write a whole line with if AND else without any ':' and it works. everytime i try to do something like that i get an error. does someone has an idea of why that is please ?
oh, wow
I challenge you to create a function that is not a class.
Inheriting from int automatically adds a init method that accepts and validates a given numerical input.
This comment is hidden because it contains spoiler information about the solution
Providing a smart solution that resolves the problem and passes the tests isn't cheating in any case. If the author wanted absolutely a function, up to him to check for it.
Loading more items...