Question: goal: Learn to write recursive functions with a base case. ( python ) Assignment: Write a function print _ tree that takes an int parameter.
goal: Learn to write recursive functions with a base case. python
Assignment: Write a function printtree that takes an int parameter. This parameter is the height of the tree to print. The tree's leaves should be asterisks and shaped as a triangle facing up At the base of the triangle, the tree should have a stem with a height of if the tree is less than high, and a height of otherwise, represented by the character If the height is not a positive number, it should print nothing.
You can at most use one other function to achieve this, which should be named printtree. You have to use recursion to complete this assignment.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
