Question: 5.14 Loop Warm up: Drawing a right triangle Write a Python function print_triangle() that will print out an isosceles right triangle based on the two
5.14 Loop Warm up: Drawing a right triangle
Write a Python function print_triangle() that will print out an isosceles right triangle based on the two formal parameters triangle_height giving the triangle height and triangle_char that gives the symbol to be printed.
Important notes: (1) This program will not return anything; it only prints. (2) That means that you will need to include a call to your function at the bottom of your .py file. We do this only to help the ZyLab Autograder. (3) For this function and the second function you are required to put in a docstring. That will be checked by a TA/grader reading the program.
Example output for print_triangle(5, '*'):
%
% %
% % %
% % % %
% % % % %
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
