By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,786 Members | 2,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,786 IT Pros & Developers. It's quick & easy.

Python is not stupid the man is it

P: n/a
I see on this link "# Python is Stupid"
http://schlake.livejournal.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


Aug 20 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Aug 20, 9:22*am, "catalinf...@gmail.com" <catalinf...@gmail.com>
wrote:
I see on this link "# Python is Stupid"http://schlake.livejournal.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
Aug 20 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.