Python Programs to Print Pa erns – Print Number, Pyramid, Star, Triangle, Diamond, and Alphabets Pa erns
1. Number Pa erns Programs In Python
Pyramid pattern of Inverted pyramid Print reverse number from Pascal’s triangle pattern using no.
numbers pattern of numbers 10 to 1 1
1 11111 11
12 2222 1 121
123 333 32 1331
1234 44 654 14641
12345 5 10 9 8 7 1 5 10 10 5 1
1 6 15 20 15 6 1
Reverse Pyramid of Number triangle Square pattern with Another inverted half-pyramid
Numbers Pattern 2: pattern numbers pattern with a number
1 1 12345 012345
21 12 22345 01234
321 123 33345 0123
4321 1234 44445 012
54321 12345 55555 01
Reverse number Inverted Pyramid Another reverse number 1
pattern pattern with the pattern 24
Pattern 1: – same digit 54321 369
55555 55555 4321 4 8 12 16
4444 5555 321 5 10 15 20 25
333 555 21 6 12 18 24 30 36
22 55 1 7 14 21 28 35 42 49
1 5
8 16 24 32 40 48 56 64
9 18 27 36 45 54 63 72 81
10 20 30 40 50 60 70 80 90 100
Pyramid pattern of Alternate numbers Multiplication table pattern
numbers pattern using a 1
1 while loop 2 4
22 1 3 6 9
333 33 4 8 12 16
4444 555 5 10 15 20 25
55555 7777 6 12 18 24 30 36
99999 7 14 21 28 35 42 49
8 16 24 32 40 48 56 64
2. Pyramid pa ern of stars in python
Simple half pyramid Right triangle pyramid Downward half-Pyramid Right down mirror star
pa ern: – of Stars Pa ern: – Pa ern of Star Pa ern: Pa ern
* * ***** *****
** ** **** ****
*** *** *** ***
**** **** ** **
***** ***** * *
Equilateral triangle Downward full Pyramid Le triangle pascal’s Right start pa ern of
pa ern of star Pa ern of star pa ern star Pa ern: –
* ****** Pa ern: – *
* * ***** * **
* * * **** ** ***
* * * * *** *** ****
* * * * * ** **** *****
* * * * * * * ***** ****
* * * * * * * **** ***
*** **
** *
*
Print two pyramids of Another diamond Diamond-shaped Sandglass pa ern of
stars Pa ern: – pa ern of star pa ern of stars star
* Pa ern: – Pa ern: – Pa ern: –
** * * *****
*** * * ** ****
**** * * *** ***
***** * * **** **
****** * * ***** *
* * ****** *
****** * * ***** **
***** * * **** ***
**** * *** ****
*** ** *****
** *
*
3. Alphabets and le ers pa ern
A P A V
BC Py BC VV
DEF Pyt DEF VVV
GHIJ Pyth GHIJ VVVV
KLMNO Pytho KLMNO VVVVV
PQRSTU Python PQRSTU
VWXYZ[\ VWXYZ[\
1. Display number from -10 to -1 using for loop.
2. Print the first 10 natural numbers using for loop.
2. WAP to print all the even numbers within the given range.
3. WAP to calculate the sum of all numbers from 1 to a given number. Or Find the sum of a series of a number up
to n terms.
4. WAP to calculate the sum of all the odd numbers within the given range.
5. WAP to print a mul plica on table of a given number.
6. WAP to display numbers from a list using a for loop.
7. WAP to count the total number of digits in a number.
8. WAP to check if the given string is a palindrome or not.
9. WAP that accepts a word from the user and reverses it.
10. WAP program to check if a given number is an Armstrong number.
11. WAP to count the number of even or odd numbers from a series of number.
12. WAP to display all numbers within a range except the prime numbers.
13. WAP to get the Fibonacci series between 0 to 50.
14. WAP to find the factorial of a given number.
15. WAP that accepts a string and calculates the number of digits and le ers.
16. WAP that iterates the integers from 1 to 25
17. WAP to check the validity of password input by users.
18. WAP to convert the month name to a number of days.