-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #281 from soham-1902/main
Add Symbol Pattern 7
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Symbol Pattern 7 | ||
|
||
**Pattern Image:** | ||
|
||
![image](https://github.com/Punit-Choudhary/Python-beginner-scripts/blob/main/Patterns/Symbol_Patterns/img/7.PNG) | ||
|
||
**Contributor:** [Soham Pande](https://github.com/soham-1902) | ||
|
||
:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it! | ||
|
||
Discord server - http://pragmaticprogrammer.in/discord | ||
|
||
Happy Coding :purple_heart: |
10 changes: 10 additions & 0 deletions
10
Patterns/Symbol_Patterns/code/Symbol_Pattern_7/symbol_pattern_7.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def print_pattern(): | ||
rows = 5 # Number of rows in the pattern | ||
for i in range(rows, 0, -1): | ||
# Print leading spaces to align the stars | ||
print(" " * (rows - i), end="") | ||
# Print stars for the current row | ||
print("* " * i) | ||
|
||
|
||
print_pattern() |