The [half-life](https://en.wikipedia.org/wiki/Half-life) of a radioactive substance is the time it takes (on average) for one-half of its atoms to undergo radioactive decay.

# Task Overview
Given the initial quantity of a radioactive substance, the quantity remaining after a given period of time, and the period of time, return the half life of that substance. 

# Usage Examples

```if:csharp
Documentation:
Kata.HalfLife Method (Double, Double, Int32)

Returns the half-life for a substance given the initial quantity, the remaining quantity, and the elasped time.

Syntax


public
static
double HalfLife(
double quantityInitial,
    double quantityRemaining,
int time
    )
  



Parameters

quantityInitial

Type: System.Double
The initial amount of the substance.

quantityRemaining

Type: System.Double
The current amount of the substance.

time

Type: System.Int32
The amount of time elapsed.

Return Value

Type: System.Double
  A floating-point number representing the half-life of the substance.

```

Difficulty: introductory

Starter code:

def half_life(initial, remaining, time):
	

Solutions:
from math import log

def half_life(N0, N, t):
    return t / log(N0/N, 2)

from math import log2

def half_life(ini, rem, t):
    return t / log2(ini / rem)

from math import log


def half_life(initial, remaining, time):
    return time*log(2.0)/log(initial/remaining)

from math import log2

def half_life(initial, remaining, time):
    return time / log2(initial / remaining)

from math import log2

def half_life(initial, remaining, time):
    return -time/log2(remaining/initial)

import math
def half_life(q0, q1, t):
   return 1/(math.log(q0/q1)/(t*math.log(2)))

from math import log; half_life=lambda i,r,t: t/log(i/r,2)

import math
def half_life(initial, remaining, time):
    return time / math.log2( initial / remaining )

from math import *

def half_life(initial, remaining, time):
    return time*log(.5) / log(remaining/initial)

from math import log2 as lg

def half_life(initial, remaining, time):
    return time / lg(initial / remaining)