Question: Create a Python program (right_triangle.py) that prints a right triangle based on user specified height triangle_height and symbol triangle_char. In this program, you need to

Create a Python program (right_triangle.py) that prints a right triangle based on user specified height triangle_height and symbol triangle_char. In this program, you need to write a function (draw_right_triangle) that takes the entered triangle_char and triangle_height as a parameters, and prints a right triangle that is made of triangle_char. Note, this function has no return statement. (1) Print what the program is going to do. (Submit for 1 point) This program will draw a right triangle (2) Prompt the user to input triangle_char and triangle_height. (Submit for 2 points, total 3) This program will draw a right triangle Enter a character: * Enter triangle height: 4 (3) Create the function (draw_right_triangle) that takes the entered values (in step 2), and prints right triangle. You must use a loop to iterate triangle_height times and print the triangle_char. (Submit for 7 points, total 10) This program will draw a right triangle Enter a character: * Enter triangle height: 4 * ** *** ****

Hi, I am trying to get the function part of this to work. Thanks!Create a Python program (right_triangle.py) that prints a right triangle based onuser specified height triangle_height and symbol triangle_char. In this program, you need

In this program, you need to write a function (draw_right_triangle) that takes the entered triangle_char and triangle_height as a parameters, and prints a right triangle that is made of triangle_char. Note, this function has no return statement. (1) Print what the program is going to do. (Submit for 1 point) This program will draw a right triangle (2) Prompt the user to input triangle_char and triangle_height. (Submit for 2 points, total 3) This program will draw a right triangle Enter a character: Enter triangle height: 4 (3) Create the function (draw_right_triangle that takes the entered values in step 2), and prints right triangle. You must use a loop to iterate triangle_height times and print the triangle_char. (Submit for 7 points, total 10) This program will draw a right triangle Enter a character: Enter triangle height: 4 **** 1 right_triangle.py print("This program will draw a right triangle") triangle_char = input("Enter a character: ") triangle_height = int(input("Enter triangle height: ")) 2. 3 4 5 def draw_right_triangle(triangle chantriangle height); pass 6 7 Dif name 9 10 mainwand draw_right_triangle(triangle_char triangle_height) for x in range(1, triangle_height+1): for f in range(1, x + 1): print(triangle_char, end="") print() 11 12 13

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!