Last active
August 29, 2015 14:02
-
-
Save rscarvalho/823ddfdb87480a038609 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
| print "\n".join(["Ja sei programar em python!" for i in range(10)]) |
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
| reduce(lambda a, e: max(a, e), map(lambda _: int(input('Digite um numero: ')), range(5))) |
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
| soma = reduce(sum, map(lambda _: int(input('Digite um numero: ')), range(5))) | |
| print("soma: %d\nmedia: %0.2f" % (soma, soma / 5.0)) |
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
| print ", ".join([str(i) for i in range(50) if i % 2 == 0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment