Götz Kluge's photos with the keyword: utter nonsense
Again: What I tell you three times is true!
28 Mar 2014 |
|
|
Let's prove that The Hunting of the Snark is Nonsense:
-----------------------------------------------------------------------------------------------------
#! /usr/bin/python
statementList = [\
"I'm very much afraid I didn't mean anything but nonsense!",
"Just the place for a Snark!",
"Just the place for a Snark!",
"6 * 7 = 42",
"I'm very much afraid I didn't mean anything but nonsense!",
"6 * 7 = 39",
"6 * 7 = 39",
"Just the place for a Snark!",
"6 * 7 = 42",
"I'm very much afraid I didn't mean anything but nonsense!",
"6 * 7 = 39",
]
for s in (s for s in frozenset(statementList) if statementList.count(s) >= 3):\
print('"' + s + '" is true!')
-----------------------------------------------------------------------------------------------------
Yuck! Ipernity doesn't allow indentation as required by Python. But the code shown above works. It yields the same results as produced by the more "pythonic" code shown in the screenshot:
-----------------------------------------------------------------------------------------------------
"I'm very much afraid I didn't mean anything but nonsense!" is true!
"6 * 7 = 39" is true!
"Just the place for a Snark!" is true!
-----------------------------------------------------------------------------------------------------
(Background image based on "Green on Green" by MJ Maccardini (trailerfullofpix)
2012-02-26, www.ipernity.com/doc/goetzkluge/30126975 )
What I tell you three times is true!
17 Jun 2013 |
|
|
=== The Bellman's rule ===
001 · · "Just the place for a Snark!" the Bellman cried,
002· · · · As he landed his crew with care;
003· · Supporting each man on the top of the tide
004· · · · By a finger entwined in his hair.
005· · "Just the place for a Snark! I have said it twice:
006· · · · That alone should encourage the crew.
007· · Just the place for a Snark! I have said it thrice:
008· · · · What I tell you three times is true."
=== Implementation of the rule ===
The little Haskell program checks whether entries in a list of statements occur three times (or more). Therefore the program is a useful tool to test the truth of statements.
Jump to top
RSS feed- Götz Kluge's latest photos with "utter nonsense" - Photos
- ipernity © 2007-2025
- Help & Contact
|
Club news
|
About ipernity
|
History |
ipernity Club & Prices |
Guide of good conduct
Donate | Group guidelines | Privacy policy | Terms of use | Statutes | In memoria -
Facebook
Twitter