7 kyu
C is for Codewars
329 of 524brodiemark
Description:
Task:
Build a string representing a capital letter C of a given size out of 'C' characters.
Examples:
generate_C(1)
should return this string:
CCCCC
C
C
C
CCCCC
generate_C(2)
should be
CCCCCCCCCC
CCCCCCCCCC
CC
CC
CC
CC
CC
CC
CCCCCCCCCC
CCCCCCCCCC
and so on. Given size
, the string should have 5*size
lines, following the format above. size
is a positive integer ≤ 2000.
Note that extra spaces after the C's in any line are incorrect. And the last line should not terminate with "\n".
This kata was inspired by A for Apple, but takes a different approach to generating letters.
Strings
ASCII Art
Similar Kata:
Stats:
Created | Dec 14, 2024 |
Published | Dec 15, 2024 |
Warriors Trained | 1049 |
Total Skips | 33 |
Total Code Submissions | 1288 |
Total Times Completed | 524 |
Python Completions | 329 |
Java Completions | 104 |
C# Completions | 39 |
Lua Completions | 16 |
Swift Completions | 43 |
Kotlin Completions | 24 |
Total Stars | 10 |
% of votes with a positive feedback rating | 90% of 88 |
Total "Very Satisfied" Votes | 73 |
Total "Somewhat Satisfied" Votes | 12 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 23 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |