Reversed Triangle Function Name: draw Triangle() Parameters: numRows (int), character (str) Returns: None Description: Y
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Reversed Triangle Function Name: draw Triangle() Parameters: numRows (int), character (str) Returns: None Description: Y
Reversed Triangle Function Name: draw Triangle() Parameters: numRows (int), character (str) Returns: None Description: You find that if you start with n characters and for every row you decrease the num- ber of characters by 1, you can print a reversed right triangle. Write a function that takes in a num- ber of rows and a character and prints a reversed right triangle with the height of the given number of rows that is made up of the given character. If you cannot make a right triangle print the string "No Triangle". Note: You need at least two rows to make a triangle. >>> drawTriangle(4, '*') >>> drawTriangle (2, '!') '!!' '!'