Write a function `take_umbrella()` that takes two arguments: a string representing the current weather and a float representing the chance of rain today.

Your function should return `True` or `False` based on the following criteria.

* You should take an umbrella if it's currently raining or if it's cloudy and the chance of rain is over `0.20`.
* You shouldn't take an umbrella if it's sunny unless it's more likely to rain than not.

The options for the current weather are `sunny`, `cloudy`, and `rainy`.

For example, `take_umbrella('sunny', 0.40)` should return `False`.

As an additional challenge, consider solving this kata using only logical operaters and not using any `if` statements.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def take_umbrella(weather, rain_chance):
	

Solutions:
def take_umbrella(weather, rain_chance):
	return weather == 'cloudy' and rain_chance > 0.2 or weather == 'rainy' or (weather == 'sunny' and rain_chance > 0.5)


def take_umbrella(weather, rain_chance):
	return rain_chance > {'sunny': 0.5, 'cloudy': 0.2, 'rainy': -1}[weather]


def take_umbrella(weather, rain_chance):
	a = weather == 'sunny' and rain_chance > 0.5
	b = weather == 'rainy'
	c = weather == 'cloudy' and rain_chance > 0.2
	return bool(a or b or c)


def take_umbrella(weather, rain_chance):
	return {weather == 'rainy': True, weather == 'cloudy' and rain_chance > 0.2: True, weather == 'sunny' and rain_chance > 0.5: True}.get(True, False)