Question:
Print the below pattern
1 2 3 4 5 6 7 8 | 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 6 5 4 3 2 1 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 |
Program:
1 2 3 4 | for i in range(1, 8 + 1): for j in range(i, 0, -1): print(j), print("") |
GlobalSQA is one-stop solution to all your QA needs. Whatever your testing needs are, we have a solution. We provide solutions for all sorts of functional and non-functional testing as well as automation testing.