Created
August 6, 2015 14:19
-
-
Save sxslex/dc97df45465ae639d0ac to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# -*- coding: UTF-8 -*- | |
# by [email protected] | |
# =) | |
def infinity(): | |
# Ao infinito e alem ... | |
i = 0 | |
while True: | |
i += 1 | |
yield i | |
def logica_dilma(meta=None): | |
# NÓS NÃO VAMOS COLOCAR UMA META, | |
del meta | |
# VAMOS DEIXAR A META EM ABERTO. | |
meta = infinity() | |
for valor in infinity(): | |
# QUANDO A GENTE ATINGIR A META, | |
if valor == meta: | |
# AÍ NÓS DOBRAMOS A META! | |
meta = meta * 2 | |
print valor | |
if __name__ == '__main__': | |
logica_dilma() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment