Upgrade to Pro — share decks privately, control downloads, hide ads and more …

O Python, o Universo e Tudo Mais

O Python, o Universo e Tudo Mais

Luan Fonseca de Farias

March 11, 2017
Tweet

More Decks by Luan Fonseca de Farias

Other Decks in Programming

Transcript

  1. O Python 1. Poderosa 2. Fácil de Aprender 3. Alto

    Nível de Abstração 4. Multi-paradigma
  2. Legibilidade def mistery(max): items = [] a, b = 0,

    1 while b < max: items.append(b) a, b = b, a + b return(items)
  3. def square(value): """ Returns the square of 'value' >>> square(10)

    100 >>> square(10.434) 108.86835599999999 """ return value * value
  4. # Just check the value if attr: print 'attr is

    truthy!' # or check for the opposite if not attr: print 'attr is falsey!'
  5. # or since None is considered # false, explicitly check

    for it if not attr: print 'attr is falsey!'
  6. Multi-paradigma numbers = [] for number in [1, 2, 3]:

    numbers.append(number * 2) double = lambda n: n * 2 numbers = map(double, [1, 2, 3]))
  7. Por Onde Começar 1. Participe na Comunidade 2. Conheça Pessoas

    3. Vá a eventos 4. Contribua com Projetos