14 Program to print reverse right angle triangle using Python

Required Output:

Program to print reverse right angle triangle using Python
Program:

star = int(input("Enter any number:"))

star = star +2



for i in range(star,0,-2):

    while(i>0):

        if i%2 == 0:

            print("0",end="")

        else:

            print("1",end="")

        i=i-1

    print()
Previous
Next Post »