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, and Full 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

Stats:

CreatedMar 16, 2016
PublishedMar 16, 2016
Warriors Trained693
Total Skips103
Total Code Submissions881
Total Times Completed213
JavaScript Completions116
Python Completions106
Total Stars12
% of votes with a positive feedback rating90% of 66
Total "Very Satisfied" Votes55
Total "Somewhat Satisfied" Votes9
Total "Not Satisfied" Votes2
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • myjinxin2015 Avatar
  • Blind4Basics Avatar
  • Voile Avatar
Ad