Q: How to remove float from the output Just a quick questions, I'm having issues with the output of the program as it does not give me the desire output
def rrecursive(pop,n,r,K):
    if n==1:
        return pop
    else:
        popu=rrecursive(pop,n-1,r,K)
        y= popu+r*(1-popu/K)*popu
        if y>9.9:
            print("It will take",n*10,"years for the population to reach 9.9 billion")
            return 0
        return y
print(rrecursive(7,40,0.11,10))

It currently prints: It will take 340 years for the population to reach 9.9 billion
0.0
I want the "0.0" to be gone. I tried doing it myself but I'm unable to solve it. I've also tried removing print statement from the function call and tried to put in (5,40,0.11,10) it printed nothing

A: print(rrecursive(7,40,0.11,10)) says to print the value returned by the function rrecursive. To call the function without printing its return value, change this to rrecursive(7,40,0.11,10).
