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.

Difficulty: introductory

Starter code:

def take_umbrella(weather, rain_chance):
	

Solutions:
def take_umbrella(weather, rain_chance):
    # Your code here.
    return (weather=='cloudy' and rain_chance>0.20) 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):
    # Your code here.
    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 == 'cloudy' and rain_chance > .2) or (weather == 'rainy') or (weather == 'sunny' and rain_chance > .5)

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

def take_umbrella(weather, rain_chance):
    return (weather == 'rainy') or (weather == 'cloudy' and rain_chance > 0.20)\
    or (rain_chance > 0.50)

arr = {'sunny': 0.50, 'rainy': -1.0, 'cloudy': 0.20}

def take_umbrella(weather, rain_chance):
    return rain_chance > arr[weather]

chance = {"rainy":-1, "cloudy":0.20, "sunny":0.50}

def take_umbrella(weather, rain_chance):
    return chance[weather] < rain_chance

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


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)