• Find
    Great Courses
  • Create
    a Course
  • About
  • Blog
  • Help
  • Login
  • Home
  • › Learn › Python for Journalists - 2011/2012 - study group
course image

Participate


Study Group (self-education) for Journalist et al. to learn how to code with Python

We are using "Learning Python the hard way" for the course Link

Tags

  • coding
  • datadrivenjournalism
  • datajournalism
  • ddj
  • programming
  • python
View Full Description
  • School of Webcraft

    WEBCRAFT

  • Runs Nov. 1, 2011
  • Kind
    Study Group
  • Signup
    Non-moderated signup
  • Chat
    #p2pu-348-python-for
  • Updates
    138
  • Organizers
    1
  • Participants
    64
  • Followers
    41
See All »

People


Lorenz (organizer) Momoko Price (participant) Sebastian Mondial (participant) Lucy Chambers (participant) Ragni (participant) jensfinnas (participant) clairemiller (participant) Joey Coleman (participant) Anders Pedersen (participant) Björn Schwentker (participant) miss p (participant) Marco Maas (participant) julius (participant) Mike Stucka (participant) sundaysed (participant) hanno (participant) Jay Cassano (participant) Lars (participant) Jan Gesthuizen (participant) alexey medvetsky (participant) mazdai (participant) Andreas Breitbach (participant) Konstantin (participant) Daniel Bishton (participant) sandayo (participant) Megan Taylor (participant) Christiane (participant) Arbin (participant) Jan Michael Ihl (participant) Dave Chakrabarti (participant) samuel (participant) Alcides Torres (participant) cosmin (participant) claudia (participant) Y-Obsessed (participant) Michael Brendler (participant) Lynda420 (participant) Lorenz (participant) Fred (participant) Tatjana Rauth (participant) Roland Legrand (participant) Claus (participant) Jean Roquette (participant) hover (participant) Matt Heintz (participant) Lokender Singh (participant) terry2 (participant) sneub (participant) adulm (participant) Tom Foster (participant) durraniius (participant) Juan Manuel Rojas (participant) permafrost (participant) mirorakonto (participant) Paula Freitas (participant) Alexa M. (participant) mynoname (participant) prtkgpt (participant) florin baranescu (participant) Vegard Venli (participant) sanfor (participant) hegemonni (participant) Joakim Palmkvist (participant) RosiePy (participant)

Tasks


  • Next meeting Jan 10th 2012, 9pm CET
  • Next meeting on 29th November - Get to Ex. 22
  • Learn P the hard way / Chapter 10-17 due Nov 15.
  • Start 1st of November

External Links


  • Learning Python the hard way
    miss p
    miss p at Python for Journalists - 2011/2012 -
    posted message: i do excercise 3, extra credit 4: floating point. i just wrote the number as 3.0, 4.0 and so on and got my fractions. however this seems like a complicated solution. i read about //, import division and float (number) but didn t get the differences between those. can anyone explain?
    03 Nov 2011 via courses.p2pu.org
    3 Comments

    Comments


  • Jan Gesthuizen   Nov. 3, 2011, 5:16 p.m.

    Youl should see a difference if you use the floating point in line 8.

    If you write

    print 3 + 2 + 1 - 5 + 4 % 2 -1.0 / 4 + 6

    it prints 7.

    But if you use

    print 3 + 2 + 1 - 5 + 4.0 % 2 -1.0 / 4 + 6

    the answer is 6.75, because python now knows it has to stop round up and down. Then it gives you the exact solution.

  • miss p   Nov. 3, 2011, 5:23 p.m.
    In Reply To:   Jan Gesthuizen   Nov. 3, 2011, 5:16 p.m.

    thanks, i saw that difference but i was wondering if there is an easier solution than writing the numbers as 4.0, etc. i wasn t quite sure what the point (no pun intended) of the exercise was? to find out that you can write numbers as 4.0? or o find a piece of code that does it for me?

  • Jan Gesthuizen   Nov. 4, 2011, 2:41 p.m.
    In Reply To:   miss p   Nov. 3, 2011, 5:23 p.m.

    I think it's just to see that python only prints gives round numbers by default and that you have to force it to do otherwise.

    Of coure there are are other solutions. For example in exercice 5 with %r or %f. I think we just have to be patient :)


P2PU Schools:
School of Social Innovation

SOCIAL INNOVATION

School of the Mathematical Future

MATHEMATICAL FUTURE

School of Webcraft

WEBCRAFT

School of Ed

SCHOOL OF EDUCATION

School of Open

SCHOOL OF OPEN

What is P2PU?

The Peer 2 Peer University is a grassroots open education project that organizes learning outside of institutional walls and gives learners recognition for their achievements. P2PU creates a model for lifelong learning alongside traditional formal higher education. Leveraging the internet and educational materials openly available online, P2PU enables high-quality low-cost education opportunities.

Connect With Us


  • FacebookF

  • TwitterT

  • Get Involved

  • Blog

  • Send us an email

Some of Our Supporters

William and Flora Hewlett Foundation Shuttleworth Foundation View all of our supporters

globe icon
  • English
  • Nederlands
  • 中文
  • Español
  • Svenska
  • עברית
  • 한국의
  • (more)
  • Help
  • About P2PU
  • Forum
  • Found a Bug?
  • Creative Commons
  • Share-Alike
  • Privacy Guidelines
  • Terms of Use
CC Icons