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 the example, input 6 = 1 line full of ■,
input 12 = 2 ■ lines,
input 18 = 3 ■ lines.
Why? Is there any special rules for those ■ lines?
Ok, I thought putting in assertions will result in the same visual output as logs (kudos! ~~
no, the assertion message is ignoring formatting. That's why the logs are there (unless I'm missing something?)
Logs in JS should be removed and placed as assertion messages
Oh. Finally understand the logic of flat rows.
Just did it. Odd n`s are foooo
the odd values are a mistake I did when I translated the kata. It should be corrected now (reset the trainer/refresh the page if it is still persisting)
thanks
All examples my code does perfectly, but test cases if very "bad".
When n is odd - heart is very asimetric, and strange.
Rows of ■■■■■■ in test cases is placed not by the same logic, as in examples
(forgot to close)
oops sorry about that. Should be good, now...
Hint: n>=6 and look at examples values
Python:
parameter n The width of heart, an even number, n>=6
I got n=9 in the random tests and the expected heart doesn't look right.
Can
t catch the logic in one moment: how many ■■■■■■ rows should I draw? Sometimes it
s (n/2) // 2, but sometimes - notexpected
'◢■◣◢■◣\n■■■■■■\n◥■■■■◤\n ◥■■◤ \n ◥◤ ' to equal '◢■◣◢■◣\n■■■■■■\n◥■■■■◤\n ◥■■◤ \n ◥◤ '
@question Not sure what's up here?
Thanks :)
.
Loading more items...