Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def quad(c,n):
- print(n * str(c))
- for x in range(n - 2):
- print(c, (((n - 2)) * (' ')), c, sep='')
- print(n * str(c))
- def retan(c,l,a):
- print(l*str(c))
- for x in range (a-2):
- print(c,((l-2)*' '),c,sep='')
- print(l*str(c))
- def trian_retan(c,h):
- print(c)
- for x in range(h-2):
- print(c,x*' ',c,sep='')
- print(str(c)*h)
- def trianisosc(c,h):
- print((h-1)*' ',str(c),sep='')
- aux=h-1
- for x in range(1,2*h-3,2):
- aux = aux - 1
- print(aux*' ',str(c),x*' ',str(c),sep='')
- print((2*h-1)*str(c))
- def hex(c,l):
- print((l-1)*' ',c*l,sep='')
- cont = 0
- while True:
- cont = cont + 1
- print((l-1-cont)*' ',c,((l-2)+(2*cont))*' ',c,sep='')
- if cont >= l-1:
- break
- cont = 0
- while True:
- cont = cont + 1
- print(cont*' ',c,(3*l-4-(2*cont))*' ',c,sep='')
- if cont == l-2:
- break
- print((l-1)*' ',c*l,sep='')
- def quadriculado(c,s,w,h):
- a = s-2
- n = str(a*' ')
- for x in range (h):
- print(((s*w)-(w-1))*c)
- for y in range(s-2):
- print(c,w*('{}{}'.format(n,c)),sep='')
- print(((s*w)-(w-1))*c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement