Everybody know that you passed to much time awake during night time...

Your task here is to define how much coffee you need to stay awake after your night. 
You will have to complete a function that take an array of events in arguments, according to this list you will return the number of coffee you need to stay awake during day time. **Note**: If the count exceed 3 please return 'You need extra sleep'.

The list of events can contain the following:

- You come here, to solve some kata ('cw').

- You have a dog or a cat that just decide to wake up too early ('dog' | 'cat').

- You just watch a movie ('movie').

- Other events can be present and it will be represent by arbitrary string, just ignore this one.

Each event can be downcase/lowercase, or uppercase. If it is downcase/lowercase you need 1 coffee by events and if it is uppercase you need 2 coffees.

Difficulty: EASY
Tags: Fundamentals

Data structures
Skill types: Data structures

Starter code:
def how_much_coffee(events):
	

Solutions:
cs = {'cw': 1, 'CW': 2, 'cat': 1, 'CAT': 2, 'dog': 1, 'DOG': 2, 'movie': 1, 'MOVIE': 2}

def how_much_coffee(events):
	c = sum((cs.get(e, 0) for e in events))
	return 'You need extra sleep' if c > 3 else c


def how_much_coffee(events):
	activities = ['cw', 'cat', 'dog', 'movie']
	coffee = 0
	for e in events:
		if e.lower() in activities:
			if e == e.upper():
				coffee += 2
			else:
				coffee += 1
			if coffee > 3:
				return 'You need extra sleep'
	return coffee


def how_much_coffee(events):
	res = 0
	for m in events:
		if m in ['cw', 'cat', 'dog', 'movie']:
			res += 1
		elif m in ['CW', 'DOG', 'MOVIE', 'CAT']:
			res += 2
	return res if res < 4 else 'You need extra sleep'


def how_much_coffee(events):
	coffee = sum((1 + e.isupper() for e in events if e.lower() in ('cw', 'cat', 'dog', 'movie')))
	return coffee if coffee <= 3 else 'You need extra sleep'


how_much_coffee = lambda events: (lambda coffee: coffee if coffee < 4 else 'You need extra sleep')(sum(map(lambda x: 2 if x.isupper() else 1, filter(lambda x: __import__('re').match('(?i)^(cw|dog|cat|movie)$', x), events))))


def how_much_coffee(events):
	EVENTS = ('cat', 'dog', 'movie', 'cw')
	cups = 0
	for event in events:
		if event.lower() in EVENTS:
			if event.isupper():
				cups += 2
			elif event.islower():
				cups += 1
	if cups > 3:
		return 'You need extra sleep'
	return cups


def how_much_coffee(events):
	coffees = 0
	for s in ['cw', 'cat', 'dog', 'movie']:
		coffees += events.count(s)
		coffees += 2 * events.count(s.upper())
	if coffees > 3:
		return 'You need extra sleep'
	return coffees


def how_much_coffee(events):
	score = sum((1 if event in ('cw', 'cat', 'dog', 'movie') else 2 if event in ('CW', 'CAT', 'DOG', 'MOVIE') else 0 for event in events))
	return 'You need extra sleep' if score > 3 else score


import re

def how_much_coffee(events):
	if events:
		a = sum([1 if re.match('^(cw|cat|dog|movie)$', i) else 0 for i in events])
		b = sum([2 if re.match('^(CW|CAT|DOG|MOVIE)$', i) else 0 for i in events])
		return 'You need extra sleep' if a + b > 3 else a + b
	return 0


import re

def how_much_coffee(events):
	c = 0
	for event in events:
		m = re.match('^(cw|dog|cat|movie)$', event, re.I)
		if m:
			if event.isupper():
				c += 2
			else:
				c += 1
	if c <= 3:
		return c
	else:
		return 'You need extra sleep'