I was wondering if this same code could be made with a for loop instead of a while
d = 0.6
b = 0.0
h = 0.0
t = 0.0
count = 0
h = float(input("enter height: "))
b = float(input("enter a number of bounces: "))
t = h
while count < b:
if count == b - 1:
t += h * d
#print(t)
else:
h = h * d
t += h * 2
#print(t)
count += 1
#print (t)
print(t)