# 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

1. The first line of your code has to be `def membership(amount, platinum, gold, silver, bronze):`
2. 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**.)
3. 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

Difficulty: EASY
Tags: Ad-hoc

Starter code:
def membership(amount, platinum, gold, silver, bronze):
	

Solutions:
def membership(amount, platinum, gold, silver, bronze):
	ordered = reversed(sorted(((v, k) for (k, v) in locals().items() if k != 'amount')))
	return next((level.capitalize() for (threshold, level) in ordered if amount >= threshold), 'Not a member')


def membership(amount, platinum, gold, silver, bronze):
	(s1, s) = (dir(), locals())
	if s[s1[0]] >= s[s1[3]]:
		return s1[3].capitalize()
	if s[s1[0]] >= s[s1[2]]:
		return s1[2].capitalize()
	if s[s1[0]] >= s[s1[4]]:
		return s1[4].capitalize()
	if s[s1[0]] >= s[s1[1]]:
		return s1[1].capitalize()
	return 'Not a member'


def membership(amount, platinum, gold, silver, bronze):
	import inspect
	args = inspect.getargspec(membership).args
	l = locals()
	return next((a.title() for a in args[1:] if l[args[0]] >= l[a]), 'Not a member')


def membership(amount, platinum, gold, silver, bronze):
	l = locals()
	a = l.pop('amount')
	try:
		return max(((v, e) for (e, v) in l.items() if a >= v))[1].capitalize()
	except:
		return 'Not a member'


def membership(amount, platinum, gold, silver, bronze):

	def res(i):
		return 'PGSBNloiroallottdvn i ezan re u   mm   e    m    b    e    r'[i::5].strip()
	for i in range(4, 0, -1):
		if eval('apgsbmloiroalloutdvnni eztn re u    m   '[0::5]) < eval('apgsbmloiroalloutdvnni eztn re u    m   '[i::5]):
			return res(i)
	return res(0)


def membership(amount, platinum, gold, silver, bronze):
	import inspect
	frame = inspect.currentframe()
	(args, _, _, values) = inspect.getargvalues(frame)
	for i in reversed(list(range(1, 5))):
		if i > 1:
			if values[args[i - 1]] > values[args[0]] >= values[args[i]]:
				return args[i].title()
		elif values[args[0]] >= values[args[i]]:
			return args[i].title()
	return 'Not a member'


def membership(amount, platinum, gold, silver, bronze):
	import inspect
	frame = inspect.currentframe()
	(args, _, _, values) = inspect.getargvalues(frame)
	if amount < values[args[4]]:
		return 'Not a member'
	elif amount < values[args[3]]:
		return ''.join([chr(66), chr(114), chr(111), chr(110), chr(122), chr(101)])
	elif amount < values[args[2]]:
		return ''.join([chr(83), chr(105), chr(108), chr(118), chr(101), chr(114)])
	elif amount < values[args[1]]:
		return ''.join([chr(71), chr(111), chr(108), chr(100)])
	else:
		return ''.join([chr(80), chr(108), chr(97), chr(116), chr(105), chr(110), chr(117), chr(109)])


def membership(amount, platinum, gold, silver, bronze):
	if amount < eval(''.join(['b', 'r', 'o', 'n', 'z', 'e'])):
		return 'Not a member'
	elif amount < eval(''.join(['s', 'i', 'l', 'v', 'e', 'r'])):
		return ''.join(['B', 'r', 'o', 'n', 'z', 'e'])
	elif amount < eval(''.join(['g', 'o', 'l', 'd'])):
		return ''.join(['S', 'i', 'l', 'v', 'e', 'r'])
	elif amount < eval(''.join(['p', 'l', 'a', 't', 'i', 'n', 'u', 'm'])):
		return ''.join(['G', 'o', 'l', 'd'])
	else:
		return ''.join(['P', 'l', 'a', 't', 'i', 'n', 'u', 'm'])


def membership(amount, platinum, gold, silver, bronze):
	import inspect
	args_names = inspect.getfullargspec(membership).args
	for level in args_names[1:]:
		if amount >= locals().get(level):
			return level.capitalize()
	else:
		return 'Not a member'