Beta

Guess the list pattern #4

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) = ['-29', '-12', '-48', '-20']

pattern(-15, -4) = ['-44', '--4', '-1-', '-21', '--6']

pattern(23, 3) = ['-95', '-11', '-82', '-30', '-01', '-45', '-52', '-69', '-38']

pattern(-27, -5) = ['-55', '--1', '-13', '-5-', '--4', '-31', '-06', '---', '-59']
Fundamentals
Lists
Data Structures
Strings
Mathematics
Arrays
Puzzles

Similar Kata:

More By Author:

Check out these other kata created by Beast

Stats:

CreatedSep 15, 2017
PublishedSep 15, 2017
Warriors Trained56
Total Skips0
Total Code Submissions22
Total Times Completed6
Python Completions6
Total Stars1
% of votes with a positive feedback rating0% of 2
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes0
Total "Not Satisfied" Votes2
Total Rank Assessments2
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
5 kyu
Ad
Contributors
  • Beast Avatar
Ad