Question: Python - give a recursive function. Paramter must be n - a number. def print_ruler (n) This function is given a positive integer n, and
Python - give a recursive function. Paramter must be n - a number.


def print_ruler (n) This function is given a positive integer n, and prints a vertical ruler of 21 - 1 ines. Each line contains '-' marks as follows: The line in the middle () of the ruler contains n '-'marks The lines at the middle of each half Gand) of the ruler contains (n-1)'-' marks The lines at theand^of the ruler contains (n-2) -'marks . And so on The lines at theof the ruler contains 1 mark 2K-1 2k' 2k' 2k
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
