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


Groups > comp.lang.python > #67401

Re: Help with "Guess the number" script

References <43B63C46-3A2D-4374-8A42-EE931BA9A6C4@cox.net> <mailman.7516.1393691734.18130.python-list@python.org> <D9724003-3B31-4B30-AEFF-9AD34F581CB8@cox.net>
Date 2014-03-02 12:16 +1100
Subject Re: Help with "Guess the number" script
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.7557.1393722973.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, Mar 2, 2014 at 12:11 PM, Scott W Dunning <swdunning@cox.net> wrote:
>>    print('You got it in ', count, 'guesses.')
>>
> Thanks Susan!  The only problem is he wants us to do it without loops because we haven’t learned them yet. I need to use the variables and function names that he’s given as well.  I think I can make sense of what you wrote though so that should help me a bit.
>

Another consideration: Susan's code is written for Python 3, but you
seemed to be using Python 2. You'll find that the code won't even run
on your version of Python.

(If you have the chance, ask if the course writer would consider
updating it to use Python 3. There's getting to be less and less
reason to use Python 2 for any new projects; when you start a brand
new system, you should be using Python 3 unless there's something
holding you on the old version. So it's correspondingly more useful to
learn Py3.)

ChrisA

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


Thread

Re: Help with "Guess the number" script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-03-01 11:35 -0500
  Re: Help with "Guess the number" script Susan Aldridge <susanaldridge555@gmail.com> - 2014-03-01 10:03 -0800
  Re: Help with "Guess the number" script Scott W Dunning <swdunning@cox.net> - 2014-03-01 18:11 -0700
    Re: Help with "Guess the number" script Larry Hudson <orgnut@yahoo.com> - 2014-03-01 23:38 -0800
    Re: Help with "Guess the number" script Scott W Dunning <swdunning@cox.net> - 2014-03-02 18:36 -0700
  Re: Help with "Guess the number" script Chris Angelico <rosuav@gmail.com> - 2014-03-02 12:16 +1100
  Re: Help with "Guess the number" script Scott W Dunning <swdunning@cox.net> - 2014-03-02 18:40 -0700
  Re: Help with "Guess the number" script Scott W Dunning <swdunning@cox.net> - 2014-03-02 20:44 -0700
  Re: Help with "Guess the number" script Ben Finney <ben+python@benfinney.id.au> - 2014-03-03 14:52 +1100
  Re: Help with "Guess the number" script Scott W Dunning <swdunning@cox.net> - 2014-03-02 21:04 -0700
  Re: Help with "Guess the number" script Dave Angel <davea@davea.name> - 2014-03-03 02:10 -0500

csiph-web