Guest User

Untitled

a guest
Sep 15th, 2019
103
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enter the height=3
  2. enter the width=3
  3. enter the number of stairs=3
  4. @@@ @@@
  5. @@ @@
  6. @ @
  7. @@@ @@@
  8. @@ @@
  9. @ @
  10. @@@ @@@
  11. @@ @@
  12. @ @
  13.  
  14. enter the height=4
  15. enter the width=4
  16. enter the number of stairs=4
  17. @@@@ @@@@
  18. @@@ @@@
  19. @@ @@
  20. @ @
  21. @@@@ @@@@
  22. @@@ @@@
  23. @@ @@
  24. @ @
  25. @@@@ @@@@
  26. @@@ @@@
  27. @@ @@
  28. @ @
  29. @@@@ @@@@
  30. @@@ @@@
  31. @@ @@
  32. @ @
  33.  
  34. #here is the program
  35. h=int(input('enter the height='))
  36. w=int(input('enter the width='))
  37. t=int(input('enter the number of stairs='))
  38. s=w*(t-1)
  39. sy=w
  40. def func(w,s1,s2):
  41. for i in range(w,0,-1):
  42. for _ in range(s1):
  43. print(end=' ')
  44. for j in range(i):
  45. print('@',end='')
  46.  
  47. for _ in range(s2):
  48. print(end=' ')
  49. s2 += 2
  50. for j in range(i):
  51. print('@', end='')
  52.  
  53. print()
  54.  
  55. for i in range(1,t+1):
  56. func(w,s,sy)
  57. s-=w
  58. sy+=w+w
RAW Paste Data