Skip to content

A collection of coding patterns for beginners and learners

License

Notifications You must be signed in to change notification settings

Twiggecode/patterns

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patterns

I have a dream. I have a dream that anyone in the world who is stuck in patterns will get help from this repository. Dear people of the world, please have a look at the patterns given below and write code to print that pattern after taking an input from the user. Each folder in this repository contains codes of corresponding patterns. If the patterns are not visible, use the pencil logo on the top right corner to see the patterns.

Please write code to whichever language you know and make them available for learners.

Please add more patterns if you like.

The following patterns should be printed when the user input is "5":

Q1)  
   *****  
   ****  
   ***  
   **  
   *  


Q2)  
*****  
 ****  
  ***  
   **  
    *  


Q3)  
*  
**  
***  
****  
*****  
 

Q4)  
    *  
   **  
  ***  
 ****  
*****  


Q5)  
*********  
 *******  
  *****  
   ***  
    *  


Q6)  
    *  
   ***  
  *****  
 *******  
*********  
 

Q7)  
*  
**  
***  
****  
*****  
****  
***  
**  
*  


Q8)  
    *  
   **  
  ***  
 ****  
*****  
 ****  
  ***  
   **  
    *  


Q9)  
    *  
   ***  
  *****  
   ***  
    *  


Q10)  
*****  
*   *  
*   *  
*   *  
*****  


Q11)  
    1
   1 2
  1 2 3 
 1 2 3 4
1 2 3 4 5


Q12)  
1 2 3 4 5
 1 2 3 4
  1 2 3 
   1 2
    1


Q13)  
        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


Q14)
***** *****
****   ****
***     ***
**       **
*         *

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


Q15)
**********
 ********
  ******
   ****
    **
    **
   ****
  ******
 ********
**********

Q16)
*****
****
***
**
*
**
***
****
*****

Q17)
*****
** **
* * *
** **
*****

Q18)
*.*.*
.*.*.
*.*.*
.*.*.
*.*.*

Q19)
    *  *
   **  **
  ***  ***
 ****  ****
*****  *****

Q20)
*
 ***
  *****
   *******
    *********

Q21)
*   *
 * *
  *
 * *
*   *

Q22)
0 1 2 3 4
1 2 3 4 5
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8

Q23)
1 1 1 1 1
1 1 2 1 1
1 2 3 2 1
2 3 4 3 2
3 4 5 4 3

Q24)
 _  _
/ \/ \
\    /
 \  /
  \/

Q25)
5 5 5 5 5
5 4 4 4 4
5 4 3 3 3
5 4 3 2 2
5 4 3 2 1

Q26)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

Q27)
1 
1 1
1 2 1
1 2 3 1
1 2 3 4 1

Q28)
1
2 3 
4 5 6 
7 8 9 10
11 12 13 14 15

Q29)
1 
2 3 4 
5 6 7 8 9

Q30)
****************
*******__*******
******____******
*****______*****
****________****
***__________***
**____________**
*______________*

Q31)
0  
0  1  
0  2  4  
0  3  6   9  
0  4  8   12  16  
0  5  10  15  20  25  
0  6  12  18  24  30  36

Project Maintainer

Profile Picture
Yash

💻

About

A collection of coding patterns for beginners and learners

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 56.0%
  • Python 15.7%
  • C 15.2%
  • C++ 13.1%