Question: Python: Complete the following program that takes in an integer I and a starting number a and prints out the first 5 terms in the
Python:

Complete the following program that takes in an integer I and a starting number a and prints out the first 5 terms in the sequence that follows the following rules (note that ni denotes element number i in the sequence): . n1 = a if n; is greater than I, then ni+1 = n; // 3 if n; is less than 1, then ni+1 = 3(n; + 8) if n; is equal to I, then ni+1 = 17n;- 21 There should be a single space separating successive numbers in the sequence
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
