June 27, 2020 By globalsqa No comments yet
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.
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
Leave a Reply