Re: Python not doing what I expect, no response. Help me, I`m new to Python
The problem must be this while loop:
I know next to nothing about math but it can only hang if the while condition is always true. A possible problem could be rounding in the improve() function, so it never actually improves. If you put floats in there they might get converted back to integers.
while (not ge (g, x)):
improve (g, x)
To debug you could let each function print input and output.
"I believe humans get a lot done, not because we're smart, but because we have thumbs so we can make coffee." --Flash Rosenberg
formerly 'known' as Euroman