You drop a ball from a given height. After each bounce, the ball returns to some fixed proportion of its previous height. If the ball bounces to height 1 or less, we consider it to have stopped bouncing. Return the number of bounces it takes for the ball to stop moving.

```
bouncingBall(initialHeight, bouncingProportion)

boucingBall(4, 0.5)
After first bounce, ball bounces to height 2
After second bounce, ball bounces to height 1
Therefore answer is 2 bounces

boucingBall(30, 0.3)
After first bounce, ball bounces to height 9
After second bounce, ball bounces to height 2.7
After third bounce, ball bounces to height 0.81
Therefore answer is 3 bounces


```

Initial height is an integer in range [2,1000]

Bouncing Proportion is a decimal in range [0, 1)

Difficulty: EASY
Starter code: def bouncing_ball(initial, proportion):
	

Solutions:
import math

def bouncing_ball(initial, proportion):
	return math.ceil(math.log(initial, 1 / proportion))


def bouncing_ball(initial, proportion):
	count = 0
	while initial > 1:
		initial = initial * proportion
		count = count + 1
	return count


def bouncing_ball(i, p, n=0):
	return n if i <= 1 else bouncing_ball(i * p, p, n + 1)


def bouncing_ball(h, bounce):
	count = 0
	while h > 1:
		count += 1
		h *= bounce
	return count


bouncing_ball = lambda x, y, p=1: p if x * y <= 1 else bouncing_ball(x * y, y, p + 1)


def bouncing_ball(initial, p):
	if initial <= 1:
		return 0
	else:
		return 1 + bouncing_ball(initial * p, p)


bouncing_ball = b = lambda i, p: i > 1 and -~b(i * p, p)


def bouncing_ball(initial, proportion):
	height_now = initial
	counter = 0
	while height_now > 1:
		height_now *= proportion
		counter += 1
	return counter


from math import ceil, log

def bouncing_ball(initial, proportion):
	return ceil(-log(initial - 1e-09, proportion))