Right Angled Triangle -3
Given an integer number N as input. Write a program to print the right - angled triangular pattern of N rows as shown below.
Input
The first line of input is a postive integer .
Explanation
For example the given number is 5 .
the output should be
______
| /
| /
| /
| /
|/
N = int(input())
for i in range(N+1):
print('_', end='')
print()
for i in range(N):
print('|', end='')
print(' ' * (N - i - 1), end='')
print('/
Comments
Leave a comment