Small Python Program For Beginners |
In this article, we are going to print out the Alphabet Pattern in Python.
If you are looking for a Python Tutorial Series then it's here
Before we jump into the code, let's first understand ASCII value and ASCII character
def alphabet():
StrExample = "ROHIT THAKUR"
for i in range(0,12):
for j in range(0, i+1):
print(StrExample[j], end="")
print()
alphabet()
The output of the code is:
R
RO
ROH
ROHI
ROHIT
ROHIT
ROHIT T
ROHIT TH
ROHIT THA
ROHIT THAK
ROHIT THAKU
ROHIT THAKUR
Comments
Post a Comment