Question 6
For positive integers, define $\operatorname{Euclid}(a,b)$ as follows: if $a\bmod b=0$, return $b$; otherwise return $\operatorname{Euclid}(b,a\bmod b)$. Here $a\bmod b$ is the remainder when $a$ is divided by $b$. What is $\operatorname{Euclid}(36,50)$?

Code notation: def defines a function; if/else selects a branch; return gives its result; print displays it; % means remainder and == tests equality.

Code notation: def defines a function; if/else selects a branch; return gives its result; print displays it; % means remainder and == tests equality.