For this game of `BINGO`, you will receive a single array of 10 numbers from 1 to 26 as an input. Duplicate numbers within the array are possible.

Each number corresponds to their alphabetical order letter (e.g. 1 = A. 2 = B, etc). Write a function where you will win the game if your numbers can spell `"BINGO"`. They do not need to be in the right order in the input array). Otherwise you will lose. Your outputs should be `"WIN"` or `"LOSE"` respectively.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Data structures

Game theory

Starter code: def bingo(array):
	

Solutions:
BINGO = {ord(c) - 64 for c in 'BINGO'}

def bingo(lst):
	return 'WIN' if set(lst) >= BINGO else 'LOSE'


def bingo(array):
	return 'WIN' if all((i in array for i in [2, 9, 14, 7, 15])) else 'LOSE'


def bingo(array):
	ctr = 0
	for i in [2, 9, 14, 7, 15]:
		if i in list(set(array)):
			ctr += 1
	if ctr == 5:
		return 'WIN'
	else:
		return 'LOSE'
	pass


def bingo(array):
	return 'WIN' if {2, 7, 9, 14, 15}.issubset(set(array)) else 'LOSE'


def bingo(array):
	return ['LOSE', 'WIN'][{2, 7, 9, 14, 15} <= set(array)]


def bingo(array):
	return 'LOSE' if set('bingo') - set((chr(i + 96) for i in array)) else 'WIN'


def bingo(a):
	return 'WIN' if all([x in a for x in [2, 7, 9, 14, 15]]) else 'LOSE'


def bingo(array):
	a = set()
	for x in array:
		if x == 2 or x == 9 or x == 14 or (x == 7) or (x == 15):
			a.add(x)
	return 'WIN' if len(a) >= 5 else 'LOSE'


def bingo(a):
	return 'LWOISNE'[{2, 7, 9, 14, 15} <= set(a)::2]