6 kyu
■□ Pattern □■ : Heart
116 of 213myjinxin2015
Description:
Task:
- Complete the pattern using the following set of characters:
■
,◥
,◤
,◣
,◢
- In this kata, we need draw a Heart.
Rules:
- parameter
n
The width of heart, an even number, n>=6, the heart's height increases with n, look at example. - return a string,
■ ◥◤◣◢
represents the heart, andFull width space character
pad at heart's left and right side.
Examples:
(Please do not mind the black stripes, this is codewars description display effect, not perfect)
draw(6)
◢
■
◣
◢
■
◣
■
■
■
■
■
■
◥
■
■
■
■
◤
◥
■
■
◤
◥
◤
draw(8)
◢
■
■
◣
◢
■
■
◣
■
■
■
■
■
■
■
■
◥
■
■
■
■
■
■
◤
◥
■
■
■
■
◤
◥
■
■
◤
◥
◤
draw(10)
◢
■
■
■
◣
◢
■
■
■
◣
■
■
■
■
■
■
■
■
■
■
◥
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
◤
◥
■
■
■
■
◤
◥
■
■
◤
◥
◤
draw(12)
◢
■
■
■
■
◣
◢
■
■
■
■
◣
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
◥
■
■
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
◤
◥
■
■
■
■
◤
◥
■
■
◤
◥
◤
draw(18)
◢
■
■
■
■
■
■
■
◣
◢
■
■
■
■
■
■
■
◣
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
◥
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
■
■
◤
◥
■
■
■
■
■
■
◤
◥
■
■
■
■
◤
◥
■
■
◤
◥
◤
ASCII Art
Similar Kata:
Stats:
Created | Mar 16, 2016 |
Published | Mar 16, 2016 |
Warriors Trained | 693 |
Total Skips | 103 |
Total Code Submissions | 881 |
Total Times Completed | 213 |
JavaScript Completions | 116 |
Python Completions | 106 |
Total Stars | 12 |
% of votes with a positive feedback rating | 90% of 66 |
Total "Very Satisfied" Votes | 55 |
Total "Somewhat Satisfied" Votes | 9 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 6 kyu |