Please could you write a Pep9 object code that receives numerical input from a user and displays a star triangle of that size. The triangle should be an inverted right angle triangle.
Solution :- A Simple program in Pep 9 Python is given below for printing " * " in the pattern of Inverted right - angled Triangle.
rows = int(input("Enter the total No of Rows : ")) print("Inverted Right Angle Triangle of Stars") i = rows while(i > 0): j = i while(j > 0): print('* ', end = ' ') j = j - 1 i = i - 1 print()
So, you please dry run it to understand the code . Then you may implement and try it with python interpretor
Get Answers For Free
Most questions answered within 1 hours.