You're given a mystery `puzzlebox` object. Examine it to make the tests pass and solve this kata.

Source: codewars | Difficulty: EASY
Tags: Ad-hoc

Starter code: def answer(puzzlebox):
	

Solutions:
def answer(puzzlebox):
	return 42


def answer(puzzlebox):
	return 42
	pass


def answer(puzzlebox):
	return 42
print(dir(puzzlebox))
print(list(dir(puzzlebox))[25:30])
print(puzzlebox.answer)
print(puzzlebox.hint)
print(puzzlebox.hint_two)
print(puzzlebox.key)
print(puzzlebox.lock)
num = 2
float = 2.3
bool = False
str = 'hello'
print(puzzlebox.lock(num))
print(puzzlebox.lock(float))
print(puzzlebox.lock(bool))
print(puzzlebox.lock(str))
print(puzzlebox.lock(puzzlebox.key))


import random

class Puzzlebox(object):

	def __init__(self):
		self.key = random.randint(1, 99)
	answer = 'Ha, not quite that easy.\n'
	hint = 'How do you normally unlock things?\n'
	hint_two = 'The lock attribute is a method. Have you called it with anything yet?\n'

	def lock(self, *args):
		if len(args) != 1:
			return 'This method expects one argument.\n'
		elif type(args[0]) != int:
			return 'This method expects an integer.\n'
		elif args[0] != self.key:
			return 'Did you know the key changes each time you print it?\n'
		else:
			return 'You put the key in the lock! The answer is, of course, 42. Return that number from your answer() function to pass this kata.\n'

	def __repr__(self):
		return 'The built-in dir() function is useful. Continue adding print statements till you know the answer.\n'

def answer(puzzlebox):
	return 42
print(answer(puzzlebox))


def answer(puzzlebox):
	return 42
print(type(dir(puzzlebox)))
for i in dir(puzzlebox):
	print(i)
x = Puzzlebox()
print(x)
print(x.answer)
print(x.hint)
print(x.hint_two)
print(x.key)
print(x.lock(x.key))


def answer(puzzlebox):
	print(dir(puzzlebox))
	print(puzzlebox.hint)
	print(puzzlebox.hint_two)
	print(puzzlebox.key)
	print(puzzlebox.lock(puzzlebox.key))
	return 42


def answer(puzzlebox):
	k = puzzlebox.key
	print(puzzlebox.lock(k))
	return 42


def answer(x):
	return 42