Retired
Guess the list pattern #1 (retired)
11 of 21Beast
Description:
Make a function called "pattern" that takes two integers as input and returns the correct pattern as a list. For this pattern the list accumulates from left to right using the mystery operator.
Four examples are shown below:
pattern(30, 7) = [0, 7, 9, 28, 0]
pattern(-15, -4) = [0, -4, 4, -16]
pattern(23, 3) = [0, 3, 5, 12, 0, 15, 29, 8]
pattern(-27, -5) = [0, -5, 13, -4, 16, -9]
Hint: Range, Step, Operator, Sum.
Fundamentals
Lists
Data Structures
Mathematics
Arrays
Puzzles
Similar Kata:
Stats:
Created | Sep 13, 2017 |
Warriors Trained | 265 |
Total Skips | 52 |
Total Code Submissions | 411 |
Total Times Completed | 21 |
Python Completions | 11 |
Ruby Completions | 1 |
JavaScript Completions | 6 |
CoffeeScript Completions | 1 |
PHP Completions | 8 |
Total Stars | 5 |
% of votes with a positive feedback rating | 55% of 10 |
Total "Very Satisfied" Votes | 3 |
Total "Somewhat Satisfied" Votes | 5 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |