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.
thank you for your attention, wow, i don't use python2
this is python 2 code.
n/2
->n//2
This comment is hidden because it contains spoiler information about the solution
This is very clever. I already guessed I didn't have the best solution but I feel very primitive now :D
nice use of abs
nice, walrus is great
You could have written
''.join(' ' * ( abs(n // 2 - i)) + '*' * (n - 2 * abs(n // 2 - i)) + '\n' for i in range(n)) if n > 0 and n % 2 else None
why have you chose variable t:= ?
sure, welcome to constant learning forever and ever and on
Ok, thanks for explanation. I started to code only few weeks ago. :)
this was written in Python 2, where the
/
behaves as floor div when both values are integers, so replace it with//
for this code to work in python 3Can you really multiply str by float? If I try this code, error occurs.
Please look at my solution.
This comment is hidden because it contains spoiler information about the solution
the abs idea is brilliant!