Answer:
Yes and Yes
Explanation:
When programs are written without indentation; it becomes a problem to read;
I'll rewrite your program as follows:
<em>def print_n(s, n): </em>
<em> if n > 0: </em>
<em> print(s) </em>
<em> print_n(s, n-1) </em>
<em> return n </em>
<em>n = 3 </em>
<em>while print_n("hi", n): </em>
<em> print_n("there!", n) </em>
<em> n = 0</em>
<em />
Using the above as a point of reference,
Yes, the program will run and Yes, it'll terminate;
Because n is initialized to 3 at line 6 (where the main starts);
The following is passed to the function; s = "hi" and n=3
This prints "hi", three times
s = "there" and n=3 is then passed to the function print_n, afterwards;
The function then prints "there" three times
Then, the program terminates