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.
Why would you need the if check? Would int(1/2) not be equal 0?
I'm fucking stupid and have started coding 2 seconds ago, can anyone explain how it works?
It is not covering all case scenarios and I think I will learn wrong because of that.
@EvgeniiKlepilin is correct, although this solution technically passes the tests, the tests don't cover all of the requirements that are listed in the description. I've posted on Discord to see if someone can add a few additional tests, as this incorrect solution is actually giving bad information to new users.
it is not a combat mission where different development of events is possible, and the task is to complete a specific mission without any if. The task is done.
The test cases for this problem do not cover instances when x or y could be strings in case of subtraction, divison or multiplication. Ideally, you would first check if x and y are ints, and not allow any operation if it they are any other type. In your case, you only cover addition with this type check. If I were to input strings in x or y with -, *, or /, it would produce a type error.
THAT IS SO COOL! I NEVER KNEW THIS! BUT NOW I DO! MUAHAHAH
This one is easy to understand.