0
Euclidean algorithm, recursion
So this is my try to implement Euclidean algorithm. I don't understand why it's returning None on last iteration https://code.sololearn.com/c2g3Zu9Lx0eD/?ref=app
8 Respuestas
+ 3
Thanks Ę ~ J It helped. So basically i just had to add return to function call in else statement
+ 1
Ę ~ J still returning None without this line
+ 1
Ę ~ J if i call the the function without print() then there will be no output as well
+ 1
Ę ~ J this algorithm must return 80 at the end, last iteration don't work i don't know why
+ 1
Ę ~ J Last call of function will be like this
eucl(160, 80)
In this case the if statement is matched, and must return 80, but it's returning None