Answer to Question #292904 in Python for gayi3

Question #292904

given an integer number N as input. write a program to print the right-angled triangular pattern of N rows as shown below.


1
Expert's answer
2022-02-01T23:52:11-0500
n = int(input('Please enter a positive integer: '))
for i in range(n-1):
    print(' '*(n-1-i),'/',' '*i,'|',sep ='')
# last line print
print('/','_'*(n-1),'|',sep ='')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS