Created
May 20, 2015 21:03
-
-
Save anabastos/ae9f7c34cb1e1c5f9f2f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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