CODE to print rhombus in python
How to print rhombus in python ? code: n=int(input("enter size of rhombus")) i=1 k=n while(i<=n): #this loop will print n numbers of rows while(k>=1): #this loop is used to gave spaces print(" "*k,end="") #this line will print k number of spaces print("*"*n) #this line will print n number of asterix symbol k=k-1 i=i+1 output: THANKYOU
Comments
Post a Comment