SHARE
TWEET

Untitled

a guest Sep 21st, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def quad(c,n):
  2.     print(n * str(c))
  3.     for x in range(n - 2):
  4.         print(c, (((n - 2)) * (' ')), c, sep='')
  5.     print(n * str(c))
  6.  
  7. def retan(c,l,a):
  8.     print(l*str(c))
  9.     for x in range (a-2):
  10.         print(c,((l-2)*' '),c,sep='')
  11.     print(l*str(c))
  12.  
  13. def trian_retan(c,h):
  14.     print(c)
  15.     for x in range(h-2):
  16.         print(c,x*' ',c,sep='')
  17.     print(str(c)*h)
  18. def trianisosc(c,h):
  19.     print((h-1)*' ',str(c),sep='')
  20.     aux=h-1
  21.     for x in range(1,2*h-3,2):
  22.         aux = aux - 1
  23.         print(aux*' ',str(c),x*' ',str(c),sep='')
  24.     print((2*h-1)*str(c))
  25. def hex(c,l):
  26.     print((l-1)*' ',c*l,sep='')
  27.     cont = 0
  28.     while True:
  29.         cont = cont + 1
  30.         print((l-1-cont)*' ',c,((l-2)+(2*cont))*' ',c,sep='')
  31.         if cont >= l-1:
  32.             break
  33.     cont = 0
  34.     while True:
  35.         cont = cont + 1
  36.         print(cont*' ',c,(3*l-4-(2*cont))*' ',c,sep='')
  37.         if cont == l-2:
  38.             break
  39.     print((l-1)*' ',c*l,sep='')
  40. def quadriculado(c,s,w,h):
  41.     a = s-2
  42.     n = str(a*' ')
  43.     for x in range (h):
  44.         print(((s*w)-(w-1))*c)
  45.         for y in range(s-2):
  46.             print(c,w*('{}{}'.format(n,c)),sep='')
  47.     print(((s*w)-(w-1))*c)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top