Skip to content

Instantly share code, notes, and snippets.

@rscarvalho
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save rscarvalho/823ddfdb87480a038609 to your computer and use it in GitHub Desktop.

Select an option

Save rscarvalho/823ddfdb87480a038609 to your computer and use it in GitHub Desktop.
print "\n".join(["Ja sei programar em python!" for i in range(10)])
reduce(lambda a, e: max(a, e), map(lambda _: int(input('Digite um numero: ')), range(5)))
soma = reduce(sum, map(lambda _: int(input('Digite um numero: ')), range(5)))
print("soma: %d\nmedia: %0.2f" % (soma, soma / 5.0))
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