pattern in python
rows = 6 #Pattern(1,121,12321,1234321,123454321)
for i in range(1, rows + 1):
for j in range(1, i - 1):
print(j, end=" ")
for j in range(i - 1, 0, -1):
print(j, end=" ")
print()
pattern in python
rows = 6 #Pattern(1,121,12321,1234321,123454321)
for i in range(1, rows + 1):
for j in range(1, i - 1):
print(j, end=" ")
for j in range(i - 1, 0, -1):
print(j, end=" ")
print()
pattern in python
j="ramkumar"
for i in range(len(j)):
for g in range(0,i+1):
print(j[g],end=' ')
print('')
# end='' meaning (print the next answer , near the previous answer in same line)
#answer 1 2 3 4 5 6 like this in same row or same line(in horizontal)
name="ramkumar"
for i in range(len(name)) :
print(name[0:i+1])
* pattern program in python
def pattern(n): for i in range(0,n): for j in range(0, i+1): print("* " , end="") print("r") pattern(5)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us