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
5 Answers
+ 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