Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

Diamond pattern #530

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@
|122 |Gundu Shreya |Shreyagundu |<img src="./Photos/Shreyagundu.jpg" width="100" /> |Shreyagundu.cpp |<img src="./Pattern_ScreenShots/Shreyagundu.png" width="100" /> |IIT, Bhilai |[email protected] |
|123 |Anurag Tripathi |triipaathii |<img src="./Photos/triipaathii.jpg" width="100" /> |triipaathii.cpp |<img src="./Pattern_ScreenShots/triipaathii.png" width="100" /> |NIT, Hamirpur |[email protected] |
| 124 | Akshat Sahu | Akshat2634 | <img src="./Photos/Akshat2634.jpeg" width="100" /> | Akshat2634.py | <img src="./Pattern_ScreenShots/Akshat2634.png" width="100" /> | Manipal University Jaipur - India | [email protected] |
| 125 | Sayali Dhadge | Sayali2811 | <img src="./Photos/Sayali2811.jpeg" width="100" /> | Sayali2811.py | <img src="./Pattern_ScreenShots/Sayali2811.png" width="100" /> | Savitribai phule pune university - India | [email protected] |
Binary file added Pattern_ScreenShots/Sayali2811.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions Patterns/Sayali2811.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#diamond pattern
rows = int(input("Enter the number of rows: "))
k=2*rows-2
for i in range(0, rows):
for j in range(0, k):
print(end=" ")
k = k - 1
for j in range(0, i + 1):
print("* ", end="")
print("")

k = rows - 2
for i in range(rows, -1, -1):
for j in range(k, 0, -1):
print(end=" ")
k = k + 1
for j in range(0, i + 1):
print("* ", end="")
print("")
Binary file added Photos/sayali2811.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.