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

Python for the Curious by Stef Sy

Avatar for PyLadies Manila PyLadies Manila
March 31, 2015
26

Python for the Curious by Stef Sy

slides prepared for the "Python for the Curious" codelab at GDG Women Techmakers 2015, March 28, 2015

Avatar for PyLadies Manila

PyLadies Manila

March 31, 2015

Transcript

  1. Structure 20 minutes installing 45 mins on Python fundamentals 5

    minutes on the local community 50 minutes working on Project Euler problems raise your hand for a coach!
  2. Why Python? Versatile and popular Lots of jobs Lots of

    great libraries Incredible community
  3. Dynamic and Strongly Typed Python is dynamically typed. Python intelligently

    assigns types, you can rebind a variable to different types of values. Python is strongly typed. Cannot mix variables of different types w/o explicitly converting type.
  4. Woah, what’s with that indentation!? Python doesn’t use braces or

    parens to distinguish between blocks of code. Code blocks are defined by an indentation. An indent is 4 spaces! This leads to highly readable code less prone to human error.
  5. Live Coding Session! Project Euler Problems 5 coaches will be

    floating around the room. Raise your hands if you’re stuck! HAVE FUN!
  6. PROJECT EULER PROBLEM 1 If we list all the natural

    numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.
  7. PROJECT EULER PROBLEM 4 A palindromic number reads the same

    both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. Hint: str(100) == ‘100’
  8. PROJECT EULER PROBLEM 5 2520 is the smallest number that

    can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? Hint: 4 % 2 == 0