Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python Online

n=3
for i in range(n):
    for m in range(2*n-1):
        k=n-m if m<n else m-1
        if i<n-k:
            print('|'*(2*k) , end="|")
        else:
            print("|"*(n-1-i)+"/"+" "*2*(i-(n-k))+"\\"+"|"*(n-i-1), end="|")
        print("|", end=" ")
    print()
        

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.