Python program to print the right half star pyramid pattern
kw.py
Output
kodingwindow@kw:~$ python3 kw.py * ** *** **** ***** ****** ******* ******** ********* **********
Python program to print the inverted right half star pyramid pattern
kw.py
Output
kodingwindow@kw:~$ python3 kw.py ********** ********* ******** ******* ****** ***** **** *** ** *
Python program to print the left half star pyramid pattern
kw.py
Output
kodingwindow@kw:~$ python3 kw.py * ** *** **** ***** ****** ******* ******** ********* **********
Python program to print the inverted left half star pyramid pattern
kw.py
Output
kodingwindow@kw:~$ python3 kw.py ********** ********* ******** ******* ****** ***** **** *** ** *
Python program to print the diamond star pyramid pattern
kw.py
Output
kodingwindow@kw:~$ python3 kw.py * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Python program to print the right half pyramid pattern using alphabets
kw.py
Output
kodingwindow@kw:~$ python3 kw.py A BC DEF GHIJ KLMNO PQRSTU
Python program to print the right half pyramid pattern using whole numbers
kw.py
Output
kodingwindow@kw:~$ python3 kw.py 0 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Python program to print the right half pyramid pattern using even numbers
kw.py
Output
kodingwindow@kw:~$ python3 kw.py 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108
Python program to print the right half pyramid pattern using odd numbers
kw.py
Output
kodingwindow@kw:~$ python3 kw.py 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109
What Next?
Python program to print the ASCII values
Python program to print the prime numbers
Python program to find the factorial of a given number
Advertisement