Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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