Jump to content

User:ANUJ KHATUA

From Wikipedia, the free encyclopedia

PYTHON CODES def LOOP():

   i=2
   while i>=0:
       j=2
       while j>=0 :
           print(2,end=" ")
           j=j-1
       print()
       i=i-1

def O():

   j=2
   while j>=0 :
       print(2,end=" ")
       j=j-1
       

def L():

   for i in range(1,4):
       for j in range(1,i+1):
           print(j,end=" ")
       print()

def x():

   i=2
   while i>=0:
       j=i+1
       while j>=1 :
           print(j,end=" ")
           j=j-1
       print()
       i=i-1

def y():

   i=2
   while i>=0:
       j=1
       while j<=i+1:
           print(j,end=" ")
           j=j+1
       print()
       i=i-1
       
           

def X():

   for i in range(3,4):
       for j in range(3,i-1):
           print(j,end=" ")
       print()

def F():

   x=1
   p=int(input("Enter the no whose FACTORIAL you want :\n"))
   while p>=1:
       x*=p
       p-=1
   print(x)

def C():

   p=ord(input("enter the character (in capital) till which you want the pattern to be:\n"))
   for i in range(65,p+1):
       for j in range(65,i+1):
           print(chr(j),end=" ")
       print()