Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'skip:[ 20': 0.04; 'output': 0.05; 'subject: + ': 0.07; 'python': 0.11; 'random': 0.14; 'doing),': 0.16; 'fly': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'skip:g 50': 0.16; ':-)': 0.16; 'sender:addr:gmail.com': 0.17; '(but': 0.19; 'import': 0.22; 'print': 0.22; 'merge': 0.24; 'skip': 0.24; 'question': 0.24; 'asking': 0.27; 'specified': 0.30; 'especially': 0.30; 'message- id:@mail.gmail.com': 0.30; 'skip:# 10': 0.33; 'could': 0.34; 'received:google.com': 0.35; "i'll": 0.36; 'list': 0.37; 'to:addr :python-list': 0.38; 'little': 0.38; 'explain': 0.39; 'embedded': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'skip:o 30': 0.61; 'wall': 0.65; 'subject:this': 0.83; '10:': 0.84; 'homework': 0.84; 'professors,': 0.84; 'subject: ...': 0.84; 'subject:might': 0.84; 'poorly': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=GtnKLS9mILaAqaTUZnfcjlFytKl89/+Fn/VfzEIf/GQ=; b=LyqVATBt/OL93cvt3XbdxZXj2wk6AWfHwCMbHBcm3gVnmwoz+Rm7ePaONj7EgG9kCR 6lnewxsNotDme92QjzO2yZSo9GS/+sf3n+QOOQI6i65gWgUTJ7l/3luof1/hvR8PAEn2 Zq2altMTRJnFKgtv2V/3Kf+UV1U4YqyK9A+rXVXrfW4D/ExoUWiM5x8HSAcUfBUMYVgT YNfTYPxfjyYl7v1ylA7WRk8NWKOiTyF3ivPulJ9OOqRYemQ6U8y+g8t83FjAhhjSd0VF FpB3YXHb4ugQsI5cccE6iNbLZJLIMhToOVFOcN0tzNxGJYJnHTmr7nYAss7f+1Azev0C rmqQ== MIME-Version: 1.0 X-Received: by 10.50.118.74 with SMTP id kk10mr9306276igb.2.1373316219475; Mon, 08 Jul 2013 13:43:39 -0700 (PDT) Sender: skip.montanaro@gmail.com Date: Mon, 8 Jul 2013 15:43:39 -0500 X-Google-Sender-Auth: NdJ5pJgaUK8MzQ6nWe4gSAWfNuk Subject: homework + obfuscation ... this might work ... From: Skip Montanaro To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373316222 news.xs4all.nl 15880 [2001:888:2000:d::a6]:47849 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50169 I have an idea. Take the threads where students ask the list to do their homework for them (but don't have the cojones to admit that's what they are doing), and merge them with the obfuscated Python idea. A group of people could come up with the solution off-list, then answer the poster's original question (no fair asking them to revise their poorly specified requirements) with a very obfuscated answer on-list. I think it would be interesting to be a fly on the wall when they explain how their programs work to their professors, especially if they have little easter eggs embedded in them. :-) Perhaps we could start with the 10 random even numbers? I'll start: #!/usr/bin/env python import random output = [] while len(output) < 10: output.append(random.randrange(0, 1000, 2)) print 1, output output = [random.randrange(0, 500) * 2 for _ in range(10)] print 2, output output = [] while len(output) < 10: r = int(round(random.random() * 500)) if r % 2: r *= 2 output.append(r) print 3, output getting-tired-of-homework-questions-in-my-old-age-ly, y'rs, Skip