0% found this document useful (0 votes)
4 views12 pages

30.pattern Practice Questions

The document contains a series of coding pattern questions focused on generating star and number patterns based on a given integer n, primarily set to 5 or 7. Each question illustrates a different arrangement of stars or numbers, showcasing various patterns such as pyramids, inverted shapes, and combinations of stars and numbers. The document serves as a practice resource for understanding and implementing pattern generation in coding.

Uploaded by

l6722977
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

30.pattern Practice Questions

The document contains a series of coding pattern questions focused on generating star and number patterns based on a given integer n, primarily set to 5 or 7. Each question illustrates a different arrangement of stars or numbers, showcasing various patterns such as pyramids, inverted shapes, and combinations of stars and numbers. The document serves as a practice resource for understanding and implementing pattern generation in coding.

Uploaded by

l6722977
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CODING BLOCKS: PATTERN QUESTIONS

Star Pattern

Ques 1:
n = 5

* * * * *
* * * * *
* * * * *
* * * * *
* * * * *

Ques 2:
n = 5

*
* *
* * *
* * * *
* * * * *

Ques 3:
n = 5

* * * * *
* * * *
* * *
* *
*

Page No. 1
CODING BLOCKS: PATTERN QUESTIONS

Ques 4:
n = 5

*
* *
* * *
* * * *
* * * * *

Ques 5:
n = 5

* * * * *
* * * *
* * *
* *
*

Ques 6:
n = 5

* * * * *
* * * *
* * *
* *
*

Page No. 2
CODING BLOCKS: PATTERN QUESTIONS

Ques 7:
n = 5

* * * * *
* *
* *
* *
* * * * *

Ques 8:
n = 5

* *
* *
*
* *
* *

Ques 9:
n = 5

*
* * *
* * * * *
* * * * * * *
* * * * * * * * *

Page No. 3
CODING BLOCKS: PATTERN QUESTIONS

Ques 10:
n = 5

* * * * * * * * *
* * * * * * *
* * * * *
* * *
*

Ques 11:
n = 5

*
* *
* * *
* * * *
* * * * *

Ques 12:
n = 5

*
* ! *
* ! * ! *
* ! * ! * ! *
* ! * ! * ! * ! *

Page No. 4
CODING BLOCKS: PATTERN QUESTIONS

Ques 13:
n = 5

*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*

Ques 14:
n = 5

*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*

Page No. 5
CODING BLOCKS: PATTERN QUESTIONS

Ques 15:
n = 5

* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *

Ques 16:
n = 5

* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *

Ques 17:
n = 7

Page No. 6
CODING BLOCKS: PATTERN QUESTIONS

* * * * * *
* * * *
* *

* *
* * * *
* * * * * *

Ques 18:
n = 7

*
* * *
* * * * *
* * * * * * *
* * * * *
* * *
*

Ques 19:
n = 7

* * * * * * *
* * * * * *
* * * *
* *
* * * *
* * * * * *
* * * * * * *
Page No. 7
CODING BLOCKS: PATTERN QUESTIONS

Ques 20:
n = 7

*
* *
* *
* *
* *
* *
*

Ques 21:
n = 5

* *
* * * *
* * * * * *
* * * * * * * *
* * * * * * * * *

Ques 22:
n = 5

* * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *

Page No. 8
CODING BLOCKS: PATTERN QUESTIONS

Number Pattern

Ques 23:
n = 5

1
1 1 1
1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1

Ques 24:
n = 5

1
2 2 2
3 3 3 3 3
4 4 4 4 4 4 4
5 5 5 5 5 5 5 5 5

Ques 25:
n = 5

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

Page No. 9
CODING BLOCKS: PATTERN QUESTIONS

Ques 26:
n = 5

1
1 2 3
1 2 3 4 5
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9

Ques 27:
n = 5

1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1

Ques 28:
n = 5

1
2 3 2
3 4 5 4 3
4 5 6 7 6 5 4
5 6 7 8 9 8 7 6 5

Page No. 10
CODING BLOCKS: PATTERN QUESTIONS

Ques 29:
n = 5

1
2 0 2
3 0 0 0 3
4 0 0 0 0 0 4
5 0 0 0 0 0 0 0 5

Ques 30:
n = 5

5 4 3 2 1
5 4 3 2 1
5 4 3 2 1
5 4 3 2 1
5 4 3 2 1

Ques 31:
n = 5

5 4 3 2 *
5 4 3 * 1
5 4 * 2 1
5 * 3 2 1
* 4 3 2 1

Page No. 11
CODING BLOCKS: PATTERN QUESTIONS

Ques 32:
n = 5

1
2 * 2
3 * 3 * 3
4 * 4 * 4 * 4
5 * 5 * 5 * 5 * 5
4 * 4 * 4 * 4
3 * 3 * 3
2 * 2
1

Ques 33:
n = 10

0
9 0 9
8 9 0 9 8
7 8 9 0 9 8 7
6 7 8 9 0 9 8 7 6
5 6 7 8 9 0 9 8 7 6 5
4 5 6 7 8 9 0 9 8 7 6 5 4
3 4 5 6 7 8 9 0 9 8 7 6 5 4 3
2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2
1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1

Page No. 12

You might also like