_Given an integer number
The first line of input is a positive integer.
For example, if the given number is
5, the output should be
______
| /
| /
| /
| /
|/
n = int(input('Please enter a positive integer: '))
for i in range(n):
print("_", end='')
print()
for i in range(n+1):
for j in range(n-i):
if(j == 0):
print("|",end='')
if(j == n-i-1):
print("/", end='')
else:
print(" ", end='')
print()
Comments
Leave a comment