This is in Python This has two parts. This is a problem on recursion. Part a: Write a recursive function that accepts an integer argument, n. The user needs to be asked for the number n. The function should display n lines of asterisks on the screen, with the first (the top) showing 1 asterisk, the second from the top showing two asterisks, up to the nth line which shows n asterisks. Part b. Write a recursive function that accepts an integer argument, n. The user needs to be asked for the number n. The function should display n lines of asterisks on the screen, with the first (the top) showing n asterisks, the second from the top showing n-1 asterisks, up to the nth line which shows 1 asterisk. Submit the two files and two sample outputs for each of the parts.
This is in Python
This has two parts. This is a problem on recursion.
Part a:
Write a recursive function that accepts an integer argument, n. The user needs to be asked for the number n. The function should display n lines of asterisks on the screen, with the first (the top) showing 1 asterisk, the second from the top showing two asterisks, up to the nth line which shows n asterisks.
Part b.
Write a recursive function that accepts an integer argument, n. The user needs to be asked for the number n. The function should display n lines of asterisks on the screen, with the first (the top) showing n asterisks, the second from the top showing n-1 asterisks, up to the nth line which shows 1 asterisk.
Submit the two files and two sample outputs for each of the parts.

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images









