Mix Fruit Juice
Description:
Story
Jumbo Juice makes a fresh juice out of fruits of your choice.Jumbo Juice charges $5 for regular fruits and $7 for special ones. Regular fruits are Banana, Orange, Apple, Lemon and Grapes. Special ones are Avocado, Strawberry and Mango. Others fruits that are not listed are also available upon request. Those extra special fruits cost $9 per each. There is no limit on how many fruits she/he picks.The price of a cup of juice is the mean of price of chosen fruits. In case of decimal number (ex. $5.99), output should be the nearest integer (use the standard rounding function of your language of choice).
Input
The function will receive an array of strings, each with the name of a fruit. The recognition of names should be case insensitive. There is no case of an empty array input.
Example
['Mango', 'Banana', 'Avocado'] //the price of this juice bottle is (7+5+7)/3 = $6($6.333333...)
Similar Kata:
Stats:
Created | Apr 30, 2017 |
Published | Apr 30, 2017 |
Warriors Trained | 1717 |
Total Skips | 28 |
Total Code Submissions | 5079 |
Total Times Completed | 1253 |
JavaScript Completions | 631 |
Python Completions | 550 |
Ruby Completions | 111 |
Crystal Completions | 8 |
Total Stars | 35 |
% of votes with a positive feedback rating | 92% of 282 |
Total "Very Satisfied" Votes | 240 |
Total "Somewhat Satisfied" Votes | 39 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 12 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |