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.
In python you can return/yield only a single object, that can be a tuple of values. (If there is a comma it'a a tuple.)
The description should describe the task.
deleted
https://docs.codewars.com/authoring/guidelines/submission-tests
True if n > 0 else False
is an unnecessarily complicated version ofn > 0
.For consistency, if you wrap a bool expression, you should wrap all expressions:
True if n > 0 else False
->True if (True if n > 0 else False) else False
-> ...And why not
(1 if n == 1 else n) > 0
orTrue if (True if (0 if n == 0 else 1 if n == 1 else n) > 0 else False) else False
?How to add random tests
Why is if-else so bad
fixed
It is hardly worth calling this pattern an email address. Real world email addresses are so much more complex, and are so much harder to validate. ALL your rules are actually wrong.
@
are completely valid. there are also situations where more than one@
is valid.+
,.
and even.
s exist..
at the end of the domain is valid ( which has a meaning to DNS )If it's worth doing, it's worth doing well. Don't call this email validation.
describe
/it
blocks in both sample and full tests.from solution import isemail
in both sample and full tests.Random and sample tests added
Okay I wrote my own description and I think that it should be fine
Hi I am new here and I am still trying too figure out how to write test but I think that I will add them soon
thank you for your comment
Loading more items...