Advertisement
Guest User

Untitled

a guest
Feb 14th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1.  
  2. row=15    
  3. col=18    
  4. str=""    
  5. for i in range(1,row+1):    
  6.     if((i<=3)or(i>=7 and i<=9)or(i>=13 and i<=15)):    
  7.         for j in range(1,col):    
  8.             str=str+"*"    
  9.         str=str+"\n"    
  10.     elif(i>=4 and i<=6):    
  11.         for j in range(1,5):    
  12.             str=str+"*"    
  13.         str=str+"\n"    
  14.     else:    
  15.         for j in range(1,14):    
  16.             str=str+" "    
  17.         for j in range(1,5):    
  18.             str=str+"*"    
  19.         str=str+"\n"    
  20. print(str)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement