Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68868

Re: loop

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'correct.': 0.07; 'bits': 0.09; 'handful': 0.09; 'lookup': 0.09; 'cc:addr:python-list': 0.11; '24,': 0.16; 'argument.': 0.16; 'assignments.': 0.16; 'calculates': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subroutine': 0.16; 'student': 0.16; 'wrote:': 0.18; 'input': 0.22; 'programming': 0.22; '(in': 0.22; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'mon,': 0.24; 'cc:2**0': 0.24; 'task': 0.26; 'defined': 0.27; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'instruction': 0.29; 'message- id:@mail.gmail.com': 0.30; 'went': 0.31; 'implemented': 0.33; 'table': 0.34; 'trouble': 0.34; 'received:google.com': 0.35; 'set.': 0.36; 'should': 0.36; 'pm,': 0.38; 'simple': 0.61; 'mar': 0.68; 'college,': 0.84; 'textbook': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=TChgl3l12LKDN9owI11ej1kPJh2qCK7VkDRQhtpO3Y4=; b=eFqDNjJgkJblmjlm4P6VxJya8CNc2Hb893/i/LN+wSnwc/HbNI56T2BKnPA+QT9lo8 vn2vXDMfncy69G4KkN0uoU7UbeWXhiAAYzgnaulWSwH8RgJAlMtcPExgrgmg/WRlUqVm /cyGrULwHsLTViwaicMezweVgBB3sRTXieJc04C9exQvAjggceAhootBOUKJ6SIYGY7K sedznAzZZy+m7BJYzEjtbJ6S4xXWKIDtFEf68s8vD9WAY3LGmyP8xukCwtHdsbgxxJkj HoHLyPJ8NOsGDabaMQcKLiLkU7HS24V59773AOXyJX5jh35nGDUWdbFCUaeZzTPcjFQ1 +dxQ==
MIME-Version 1.0
X-Received by 10.68.200.74 with SMTP id jq10mr1191803pbc.169.1395658709188; Mon, 24 Mar 2014 03:58:29 -0700 (PDT)
In-Reply-To <877g7j29qn.fsf@elektro.pacujo.net>
References <e2be2ed8-e2b8-427c-b826-e7240ecc5bdf@googlegroups.com> <mailman.8426.1395622335.18130.python-list@python.org> <87fvm811i7.fsf@elektro.pacujo.net> <mailman.8441.1395654073.18130.python-list@python.org> <877g7j29qn.fsf@elektro.pacujo.net>
Date Mon, 24 Mar 2014 21:58:29 +1100
Subject Re: loop
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8444.1395658712.18130.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1395658712 news.xs4all.nl 2975 [2001:888:2000:d::a6]:54134
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68868

Show key headers only | View raw


On Mon, Mar 24, 2014 at 9:04 PM, Marko Rauhamaa <marko@pacujo.net> wrote:
> Once in college, we were given assembly programming assignments. The
> textbook defined an imagined 18-bit CPU and an instruction set.
>
> A fellow student was given the task to write a subroutine that
> calculates the factorial of the argument. He went through the trouble of
> creating a loop with multiplication etc. I argued (in vain) that his
> solution is "wrong" from all angles; he should have implemented his
> subroutine with a simple lookup table since 18 bits can only take a
> handful of input values (0 through 8).

The task was "calculates". If the task was "returns", then the lookup
table would be correct. :)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

loop pabloeruggeri@gmail.com - 2014-03-23 17:35 -0700
  Re: loop MRAB <python@mrabarnett.plus.com> - 2014-03-24 00:50 +0000
    Re: loop pabloeruggeri@gmail.com - 2014-03-23 17:57 -0700
  Re: loop Chris Angelico <rosuav@gmail.com> - 2014-03-24 11:52 +1100
    Re: loop Marko Rauhamaa <marko@pacujo.net> - 2014-03-24 09:47 +0200
      Re: loop Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 09:40 +0000
        Re: loop Marko Rauhamaa <marko@pacujo.net> - 2014-03-24 12:04 +0200
          Re: loop Chris Angelico <rosuav@gmail.com> - 2014-03-24 21:58 +1100
  Re: loop Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-24 00:56 +0000
  Re: loop anton <bupphairodazz@yandex.ru> - 2014-03-23 17:59 -0700
    Re: loop Mark H Harris <harrismh777@gmail.com> - 2014-03-23 22:30 -0500
  Re: loop Ben Finney <ben+python@benfinney.id.au> - 2014-03-24 13:31 +1100

csiph-web