Question: Next Description triangle Write a function show_triangle that prints a pretty triangle. To get full marks, you must use recursion to generate the triangle.

Next Description triangle Write a function show_triangle that prints a pretty triangle. To get full marks, you must use recursion to generate the triangle. >>> show_triangle (5) * * * * * * * * * * >>> show_triangle (3) * * * * * * * >>> show_triangle (1) >>> >>> show_triangle (0) triangle Hint: write a helper function triangle (n) that returns a list of n strings, where each string is a row of the triangle. You can then use the join method on strings to put the lines together.
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
Heres an implementation of the showtriangle function using recursion to generate the triangle python ... View full answer
Get step-by-step solutions from verified subject matter experts
