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


Groups > comp.lang.python > #68868

Re: loop

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 2014-03-24 21:58 +1100
Subject Re: loop
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.8444.1395658712.18130.python-list@python.org> (permalink)

Show all headers | 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