The function is not returning the correct values. Can you figure out why?

```python
get_planet_name(3) # should return 'Earth'
```

Difficulty: EASY

Starter code:
def get_planet_name(id):
	

Solutions:
def get_planet_name(id):
	return {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}.get(id, None)


def get_planet_name(id):
	return ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'][id - 1]


def get_planet_name(id):
	name = ''
	if id == 1:
		name = 'Mercury'
	if id == 2:
		name = 'Venus'
	if id == 3:
		name = 'Earth'
	if id == 4:
		name = 'Mars'
	if id == 5:
		name = 'Jupiter'
	if id == 6:
		name = 'Saturn'
	if id == 7:
		name = 'Uranus'
	if id == 8:
		name = 'Neptune'
	if id == 9:
		name = 'Pluto'
	return name


get_planet_name = lambda id: ['Kypton', 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'][id]


get_planet_name = (None, 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune').__getitem__


def get_planet_name(id):
	switcher = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return switcher.get(id, 'Invalid ID')


def get_planet_name(id):
	if id == 1:
		return 'Mercury'
	elif id == 2:
		return 'Venus'
	elif id == 3:
		return 'Earth'
	elif id == 4:
		return 'Mars'
	elif id == 5:
		return 'Jupiter'
	elif id == 6:
		return 'Saturn'
	elif id == 7:
		return 'Uranus'
	elif id == 8:
		return 'Neptune'
	else:
		raise Exception()


def get_planet_name(i):
	return {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}[i]


get_planet_name = lambda i: ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'].__getitem__(i - 1)


def get_planet_name(id):
	name = ''
	switch = {'1': 'Mercury', '2': 'Venus', '3': 'Earth', '4': 'Mars', '5': 'Jupiter', '6': 'Saturn', '7': 'Uranus', '8': 'Neptune'}
	return switch.get(str(id))
get_planet_name(1)


def get_planet_name(id: int) -> str:
	planets = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return planets.get(id)


def get_planet_name(id):
	planets = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune', 9: 'Pluto'}
	return planets.get(id)


def get_planet_name(i):
	names = ['Sun', 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
	return names[i]


def get_planet_name(id):
	return 'Sun Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune'.split()[id]


def get_planet_name(id):
	planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
	name = ''
	if id - 1 < len(planets):
		return planets[id - 1]
	return name


def get_planet_name(id):
	name = ('a', 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune')
	return name[id]


get_planet_name = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}.get


def get_planet_name(id):
	name = ''
	for (idx, planete) in [(1, 'Mercury'), (2, 'Venus'), (3, 'Earth'), (4, 'Mars'), (5, 'Jupiter'), (6, 'Saturn'), (7, 'Uranus'), (8, 'Neptune')]:
		if idx == id:
			return planete
	return 'ID not fund'


def get_planet_name(id):
	d = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return d.get(id, "Sorry, that's not a planet.")


def get_planet_name(id):
	id_dict = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	for key in id_dict.keys():
		if key == id:
			return id_dict[key]


def get_planet_name(id: int) -> 'Returns a Planet':
	p = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
	return p[id - 1]


def get_planet_name(id):
	planet = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	for (key, val) in planet.items():
		if key == id:
			return val


def get_planet_name(id):
	switch = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return switch.get(id, 'Invalid Planet Selection')


def get_planet_name(id):
	switch = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return switch.get(id, 'wrong walue')


def get_planet_name(id):
	name = ''
	dict_ = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return dict_[id]


def get_planet_name(id):
	planets = ['The Sun', 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
	return planets[id]


def get_planet_name(id):
	planets = (None, 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune')
	return planets[id]


def get_planet_name(id):
	name = ['Sun', 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune', 'Pluto']
	return name[id]


def get_planet_name(id):
	name = ''
	planets = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	if id in planets:
		return planets[id]
	else:
		return f'{id} not available.'
	return name


def get_planet_name(id):
	if id == 1:
		name = 'Mercury'
	elif id == 2:
		name = 'Venus'
	elif id == 3:
		name = 'Earth'
	elif id == 4:
		name = 'Mars'
	elif id == 5:
		name = 'Jupiter'
	elif id == 6:
		name = 'Saturn'
	elif id == 7:
		name = 'Uranus'
	elif id == 8:
		name = 'Neptune'
	else:
		print('ivalid id')
	return name


def get_planet_name(id):
	planet_dict = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	name = planet_dict.get(id, 'Not found by id')
	return name


def get_planet_name(name):
	planet = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
	return planet[name - 1]


def get_planet_name(number):
	planets = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return planets[number] if number in planets else None


def get_planet_name(id):
	switcher = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return switcher.get(id) if 0 < id < 9 else 'no planet for id {}'.format(id)


def get_planet_name(id):
	plannetdict = dict({1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'})
	return plannetdict[id]


def get_planet_name(id):
	switchcase = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return switchcase.get(id, 'Invalid planet id!')


def get_planet_name(id):
	name1 = 'Mercury'
	name2 = 'Venus'
	name3 = 'Earth'
	name4 = 'Mars'
	name5 = 'Jupiter'
	name6 = 'Saturn'
	name7 = 'Uranus'
	name8 = 'Neptune'
	if id == 1:
		return name1
	elif id == 2:
		return name2
	elif id == 3:
		return name3
	elif id == 4:
		return name4
	elif id == 5:
		return name5
	elif id == 6:
		return name6
	elif id == 7:
		return name7
	else:
		return name8


def get_planet_name(id):
	plantes = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	if id in plantes.keys():
		return plantes.get(id)
	else:
		return 'not plante in this range'


def get_planet_name(id):
	return switch(id)

def switch(id):
	case = {'case1': {'name': 'Mercury'}, 'case2': {'name': 'Venus'}, 'case3': {'name': 'Earth'}, 'case4': {'name': 'Mars'}, 'case5': {'name': 'Jupiter'}, 'case6': {'name': 'Saturn'}, 'case7': {'name': 'Uranus'}, 'case8': {'name': 'Neptune'}}
	caseKey = 'case' + str(id)
	return case.get(caseKey, case.get('case1')).get('name')


def get_planet_name(id):
	planents = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return planents[id]
print(get_planet_name(3))


planets = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}

def get_planet_name(number):
	return planets.get(number)


def get_planet_name(id):
	if id == 1:
		return 'Mercury'
	elif id == 2:
		return 'Venus'
	elif id == 3:
		return 'Earth'
	elif id == 4:
		return 'Mars'
	elif id == 5:
		return 'Jupiter'
	elif id == 6:
		return 'Saturn'
	elif id == 7:
		return 'Uranus'
	elif id == 8:
		return 'Neptune'
	return 'Invalid Planet Index'


def get_planet_name(id):
	switcher = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	return switcher.get(id, 'invalid planet index')


def get_planet_name(id):
	name = ''
	planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
	ID = [1, 2, 3, 4, 5, 6, 7, 8]
	for i in range(len(ID)):
		if id == ID[i]:
			return planets[i]


def get_planet_name(num):
	if num == 1:
		return 'Mercury'
	elif num == 2:
		return 'Venus'
	elif num == 3:
		return 'Earth'
	elif num == 4:
		return 'Mars'
	elif num == 5:
		return 'Jupiter'
	elif num == 6:
		return 'Saturn'
	elif num == 7:
		return 'Uranus'
	elif num == 8:
		return 'Neptune'
	elif num == 9:
		return 'Pluto'
	else:
		return 'Not in range'


def get_planet_name(id):
	planet_names = {1: 'Mercury', 2: 'Venus', 3: 'Earth', 4: 'Mars', 5: 'Jupiter', 6: 'Saturn', 7: 'Uranus', 8: 'Neptune'}
	if id > 8:
		print('Kelebihan Bos')
	elif id < 0:
		print('Belajar Lagi Bos')
	else:
		return planet_names.get(id)
print(get_planet_name(3))