15 Aug 2016

Happy 70th Independence Day, INDIA

 #list  
 indep1 = ['I','N','D','E','P']  
 indep2 = ['E','N','D','E']  
 indep3 = ['N','C','E']  
 sev1 = ['S','E','V']  
 sev2 =['N','T','Y']  
 day = ['A','Y']  
 happy = ['H','A','P','P','Y']  
   
 for i in range (0,5):  
      for k in range (0,3):  
           print(' '),  
      for j in range (3,8):            
           if (i == 1 or i == 3) and (j == 4 or j == 5 or j == 6):  
                print(' '),  
           elif j == 3:  
                print('{0} '.format(indep1[i])),  
           elif i == 2 and j == 4:  
                print('{0} '.format(day[0])),  
           elif i == 2 and j == 5:  
                print('{0} '.format(day[1])),       
           elif j == 7:  
                print('{0} '.format(happy[i])),            
           else:  
                print('* '),  
      print  
   
 for i in range (5,9):  
      for k in range (0,3):  
           print(' '),  
      for j in range (3,4):  
           print('{0} '.format(indep2[i-5])),  
      print  
   
 for i in range (10,13):  
      for k in range (12,i,-1):  
           print(' '),  
      for j in range (10,i+1):  
           if i == 12:  
                for index in range (0,3):  
                     print('{0}'.format(sev1[index])),  
                break  
           else:            
                print('*'),  
   
      for j in range (3,4):  
           print('{0}'.format(indep3[i-10])),  
   
      for j in range (10,i+1):  
           if i == 12:  
                for index in range (0,3):  
                     print('{0}'.format(sev2[index])),  
                break  
           else:            
                print('*'),  
      print  

Output:


No comments:

Post a Comment