Retired
Guess the list pattern #2 (retired)
8 of 14Beast
Description:
Make a function called "pattern" that takes two integers as input and returns the correct pattern as a list.
Four examples are shown below:
pattern(30, 7) = [-1, -8, -3, -2, -1]
pattern(-15, -4) = [3, -2, 0, -1]
pattern(23, 3) = [-3, -8, -4, -1, -4, -2, -1, -1]
pattern(-27, -5) = [2, -5, 0, -4, 1, -1]
Hint: Range, Step, Operators, Sum
Fundamentals
Lists
Data Structures
Mathematics
Arrays
Puzzles
Similar Kata:
Stats:
Created | Sep 14, 2017 |
Warriors Trained | 181 |
Total Skips | 44 |
Total Code Submissions | 227 |
Total Times Completed | 14 |
Python Completions | 8 |
Ruby Completions | 1 |
JavaScript Completions | 7 |
CoffeeScript Completions | 1 |
PHP Completions | 2 |
Total Stars | 3 |
% of votes with a positive feedback rating | 30% of 5 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 4 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 5 kyu |