prodevans / LEAP2.0

Leap 2.0 is a platform offered by Complete open Source Solutions(COSS),where students from different campus irrespective of all platforms can join to explore themselves with the limitless IT world by gaining knowledge on open source cutting edge technologies on demand and get opportunity to work on live projects.
3 stars 6 forks source link

Python Task :- (Pattern Programming) #11

Closed jeethub26230 closed 4 years ago

jeethub26230 commented 4 years ago

Create a Program which provides the below given pattern.


*
* *
* * *
* * * *
* * * * *
vamsipvk2203 commented 4 years ago

pattern

def pattern(n): 
    for i in range(1,n+1):
        for j in range(1,i+1):
            print("* ",end='')
        print('')

val = int(input('Enter the number of rows: '))
pattern(val)
srvk99 commented 4 years ago

Star Pattern

n = int(input("Enter the number: "))
def tree(n): 
    for m in range(0, n): 
        for n in range(0, m+1): 
            print("* ",end="") 
        print()
if (n<0):
    print("Positive number please!")
else:
    tree(n) 
kautilya2000 commented 4 years ago
def pyramid(p):
       for m in range(0, p):
               for n in range(0, m+1):
                       print("* ",end="")
         print("\r")
p = 5
pyramid(p)
bvjhansisaketa commented 4 years ago
for i in range(0,6):
    for j in range(0,i):
        print("*",end="")
    print("\n")
Debasis500 commented 4 years ago
# pattern formation

def pattern(number):
    for i in range(0,number+1):
        for j in range(0,i):
            print("*",end="")

        print("")
num=int(input())
pattern(num)
VijitSai commented 4 years ago
n = int(input("No. of rows to print"))
for i in range(0, n):
    for j in range(0, i+1):
        print("* ",end="")
    print("\n")
sravan950 commented 4 years ago

rows = int(input("Enter number of rows ")) for i in range(0, rows): for j in range(0, i + 1): print("*", end=' ')

print("\r")
DinuDante commented 4 years ago
#This is Dinesh Behera
#Pattern Logic
def patrn(n):
    for i in range(0,n+1):
        for j in range(0,i):
            print("* ",end="")
        print("")
#Driver Code
n=int(input("Enter the pattern limit:"))
patrn(n)
sahoo97 commented 4 years ago

suchitra sahoo

n=int(input( " enter num of rows :") i=1 while i<=n: print("" i) i=i+1

megha-biswas01 commented 4 years ago
def pattern():
    num = int(input("Enter how many rows do you want to print the pattern upto"))
    for i in range(1,num+1):
        for j in range(1,i+1):
            print("*",end=" ")
        print()
    option=input(print("Do you want to continue:(y/n)"))
    if (option == 'y'):
        pattern()
    else:
        print("Thank You")
print("Welcome")
pattern()