Python is not stupid the man is it

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • catalinfest@gmail.com

    Python is not stupid the man is it

    I see on this link "# Python is Stupid"

    Code is

    #!/usr/bin/env python
    for flour in range( 50, 1000 + 1, 5): # Python is Stupid
    print '%.2f %.2f %.2f' % ( (flour), (flour * 0.6), (flour * 0.02) )

    Output is corect :D




  • eliben

    #2
    Re: Python is not stupid the man is it

    On Aug 20, 9:22 am, "catalinf...@gm ail.com" <catalinf...@gm ail.com>
    wrote:
    I see on this link "# Python is Stupid"http://schlake.livejou rnal.com/809567.html
    Code is
    >
    #!/usr/bin/env python
    for flour in range( 50, 1000 + 1, 5): # Python is Stupid
      print '%.2f %.2f %.2f' % ( (flour), (flour * 0.6), (flour * 0.02) )
    >
    Output is corect  :D
    Just a guess, but the comment may refer to the specification of range.
    Specifically, he writes 1000 + 1 to include 1000 in the range, as
    range is not inclusive.

    Eli

    Comment

    Working...