A brilliant solution to Sum Arrays (Python) (retired)
Description:
You've just finished a simple kata asking you to return the sum of an array.
While you're drinking your tea scrolling on your colleagues solutions to find an inspiration for your daily dose of improving-yourself-techniques, you come up to this
After quickly realising how brilliant that solution is, a tear drop from your eye thinking about how long it could have required to your untiring collegue(s) to came up with that. You then decide that you want to be part of the history and write a code able to write the solution.
Since you want to give max value to the community you also decide that the brilliant_solution
implementation will be able to print down the body of a function named function_name
taking variable_name
as a parameter and manually summing togheter up to max_length
elements of an array.
Info
- Use the exact same formatting as the linked solution for the simple kata, i.e.:
- 4 spaces indentation (no tabs)
- No leading/trailing newlines
- Space beetween operators
x + y
notx+y
andlen(x) == y
notlen(x)==y
- Beware that your implementation should be agnostic about the function and variable names, i.e. make use of all the provided params!
Similar Kata:
Stats:
Created | Sep 4, 2023 |
Warriors Trained | 31 |
Total Skips | 0 |
Total Code Submissions | 62 |
Total Times Completed | 9 |
Python Completions | 9 |
Total Stars | 0 |
% of votes with a positive feedback rating | 25% of 6 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 7 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |