7 kyu
Average Array
1,004 of 2,091K-Calderon-ASC
Description:
ASC Week 1 Challenge 5 (Medium #2)
Create a function that takes a 2D array as an input, and outputs another array that contains the average values for the numbers in the nested arrays at the corresponding indexes.
Note: the function should also work with negative numbers and floats.
Examples
[ [1, 2, 3, 4], [5, 6, 7, 8] ] ==> [3, 4, 5, 6]
1st array: [1, 2, 3, 4]
2nd array: [5, 6, 7, 8]
| | | |
v v v v
average: [3, 4, 5, 6]
And another one:
[ [2, 3, 9, 10, 7], [12, 6, 89, 45, 3], [9, 12, 56, 10, 34], [67, 23, 1, 88, 34] ] ==> [22.5, 11, 38.75, 38.25, 19.5]
1st array: [ 2, 3, 9, 10, 7]
2nd array: [ 12, 6, 89, 45, 3]
3rd array: [ 9, 12, 56, 10, 34]
4th array: [ 67, 23, 1, 88, 34]
| | | | |
v v v v v
average: [22.5, 11, 38.75, 38.25, 19.5]
Fundamentals
Similar Kata:
Stats:
Created | Jul 19, 2017 |
Published | Jul 20, 2017 |
Warriors Trained | 3812 |
Total Skips | 83 |
Total Code Submissions | 7601 |
Total Times Completed | 2091 |
JavaScript Completions | 1004 |
C# Completions | 197 |
Ruby Completions | 116 |
Haskell Completions | 53 |
Python Completions | 728 |
PHP Completions | 85 |
Total Stars | 47 |
% of votes with a positive feedback rating | 91% of 462 |
Total "Very Satisfied" Votes | 392 |
Total "Somewhat Satisfied" Votes | 58 |
Total "Not Satisfied" Votes | 11 |
Total Rank Assessments | 11 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |