Advertisement
STANAANDREY

lsd3 15

Oct 14th, 2022
1,219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. def line(n, x):
  2.     if n == 0:
  3.         return
  4.  
  5.     print(x, end=" ")
  6.     line(n - 1, x)
  7.  
  8.  
  9. def triangle(n):
  10.     if n == 0:
  11.         return
  12.  
  13.     triangle(n - 1)
  14.     line(n, n)
  15.     print("")
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement