I wrote a function that my teacher told me to write and for some reason when its done and wants to return the number returns None why?

前端 未结 0 638
刺人心
刺人心 2020-12-05 19:52

there is my code:

def foo(a, b):
    if b == 0:
        return b
    else:
        foo(b, a%b)    

print(foo(45, 25)) 

can somebody explain

相关标签:
回答
  • 消灭零回复
提交回复
热议问题