¡@

Home 

python Programming Glossary: is_power

why doesn't python return booleans

http://stackoverflow.com/questions/17473276/why-doesnt-python-return-booleans

if a is b raised to some exponent. This is the code. def is_power a b if not a b 0 return a b 0 elif a b 1 return a b 1 else a.. not a b 0 return a b 0 elif a b 1 return a b 1 else a a b is_power a b print is_power The problem is that this always returns None.. b 0 elif a b 1 return a b 1 else a a b is_power a b print is_power The problem is that this always returns None no matter what..