Skip to content

Commit

Permalink
Merge pull request AdarshAddee#155 from aritroo/main
Browse files Browse the repository at this point in the history
Added a new Character pattern code in python
  • Loading branch information
AdarshAddee committed Oct 4, 2022
2 parents 78a212d + 04fec01 commit 4385631
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
| Rahul Jangle | <a href="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/Rronny01/">Ronny</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Anurag Vats | <a href="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/AnuragVats007">Anurag Vats</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Daksh Kesarwani | <a href="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/InnocentDaksh63">Daksh kesaarwani</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Aritroo Chowdhury | <a href="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/aritroo">Aritroo Chowdhury</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Daksh Kesarwani | <a href="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/InnocentDaksh63">Daksh kesaarwani</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Kartikey Singh | <a href="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/kartik-ey1">Kartikey Singh</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Daksh Kesarwani | <a href="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/InnocentDaksh63">Daksh kesaarwani</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Pradeep Khatri | <a href="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/PradeepKhatri">Pradeep Khatri</a> | <a href="mailto:[email protected]">E-Mail</a> |
Expand Down Expand Up @@ -58,6 +60,7 @@




<br>
<h1>
Happy Hacking ❤💻
Expand Down
32 changes: 32 additions & 0 deletions Python/character_pattern.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Python program to generate a character pattern

# Github Username : aritroo

#Example Output is given below :-
# Enter the number of rows : 5
# A
# B B
# C C C
# D D D D
# E E E E E



def character(n):

num = 65

for i in range(0, n):

for j in range(0, i+1):

ch = chr(num)

print(ch, end=" ")

num = num + 1

print("\r")

n = int(input("Enter the number of rows : "))
character(n)

0 comments on commit 4385631

Please sign in to comment.