6 kyu
Membership (with restrictions)
122suic
Description:
Task
Determine the client's membership level based on the invested amount
of money and the given thresholds for membership levels.
There are four membership levels (from highest to lowest): Platinum, Gold, Silver, Bronze
The minimum investment is the threshold limit for Bronze
membership. If the given amount is less than the Bronze
treshold limit return Not a member
.
A client belongs to a membership level when his invested amount is greater than or equal the level's threshold amount.
Examples:
|--------+----------+------+--------+--------+--------------+------------------|
| Amount | Platinum | Gold | Silver | Bronze | Result | Explanations |
|--------+----------+------+--------+--------+--------------+------------------|
| 7000 | 10000 | 8000 | 6000 | 4000 | Silver | Amount >= Silver |
| 3000 | 10000 | 8000 | 6000 | 5000 | Not a member | Amount < Bronze |
| 8000 | 12000 | 8000 | 7000 | 5000 | Gold | Amount >= Gold |
|--------+----------+------+--------+--------+--------------+------------------|
Restrictions
- The first line of your code has to be
def membership(amount, platinum, gold, silver, bronze):
- Your code except for the firt line mustn't contain the words
platinum, gold, silver, bronze
or they reversed forms (e.g.dlog
) or any string which contains these words or they reversed forms. (The check is case-insensitive.) - Must not contain:
+, %, {, }
.
Disclaimer
This kata is about creativity not proper coding style. Your colleagues/boss won't like you if you make production code like this. :)
Don't forget to rate the kata after you finish it. :)
Happy coding!
suic
Puzzles
Restricted
Similar Kata:
Stats:
Created | Dec 1, 2017 |
Published | Dec 2, 2017 |
Warriors Trained | 308 |
Total Skips | 4 |
Total Code Submissions | 881 |
Total Times Completed | 122 |
Python Completions | 122 |
Total Stars | 10 |
% of votes with a positive feedback rating | 81% of 51 |
Total "Very Satisfied" Votes | 38 |
Total "Somewhat Satisfied" Votes | 7 |
Total "Not Satisfied" Votes | 6 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |