Skip to content

Instantly share code, notes, and snippets.

@anabastos
Created May 20, 2015 21:03
Show Gist options
  • Save anabastos/ae9f7c34cb1e1c5f9f2f to your computer and use it in GitHub Desktop.
Save anabastos/ae9f7c34cb1e1c5f9f2f to your computer and use it in GitHub Desktop.
piramid = map(lambda n: "/n".join([" "*(n-i-1)+"."+" ."*i for i in range(n) if n>1]))
def piradimidinha_rec(n):
if n < 1 return ["."]
map(lambda piramid2: piramid1(n-1)+" .")
return " "*n-1+"*"+
n= input("Numero de linhas: ")
if n>1:
for i in range(n):
n-=1
print " "*n+"."+" ."*i
else:
print(".")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment