Re: [Tutor] Python Programming for the absolute beginner 3e, Ch3 Challenge 4

2013-08-12 Thread Alan Gauld
On 12/08/13 16:20, Prasad, Ramit wrote: A binary chop is an algorithm. Also known as Binary search; binary chop was not a name I had heard before either. Maybe a UK thing. It means chop as in Karate not as in Lamb... -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk

[Tutor] Python Programming for the absolute beginner 3e, Ch3 Challenge 4

2013-08-11 Thread John Feleppa
Thanks for getting back to me... I am using Python 3.3.2. The challenge is as follows: # Chapter 3 Challenge 4 # # Write the psudocode for a program where the player and the computer # trade places in the number guessing game. That is, the player picks a # random number between 1 and 100 that t

Re: [Tutor] Python Programming for the absolute beginner 3e, Ch3 Challenge 4

2013-08-10 Thread ALAN GAULD
Also don't know how to do a binary chop, but the book hasn't covered anything  >like that - it has just taught if, else and while,  > >A binary chop is an algorithm. All you need is if/else and while. The algorithm looks a bit like this: while not found        determine the middle value between mi

Re: [Tutor] Python Programming for the absolute beginner 3e, Ch3 Challenge 4

2013-08-09 Thread ALAN GAULD
# Write the psudocode for a program where the player and the computer ># trade places in the number guessing game.  That is, the player picks a  ># random number between 1 and 100 that the computer has to guess. ># Before you start, think about how you guess.  If all goes well, try ># coding the

Re: [Tutor] Python Programming for the absolute beginner 3e Ch3 Challenge 4

2013-08-08 Thread Alan Gauld
On 08/08/13 18:05, John Feleppa wrote: I am working through Michael Dawson's book, "Python Programming for the absolute beginner 3rd edition". Have just completed Chapter 3, but cannot solve Challenge 4. Has anyone solved this yet - and be willing to share this code? If you give us a clue wh

[Tutor] Python Programming for the absolute beginner 3e Ch3 Challenge 4

2013-08-08 Thread John Feleppa
Hello, I am working through Michael Dawson's book, "Python Programming for the absolute beginner 3rd edition". Have just completed Chapter 3, but cannot solve Challenge 4. Has anyone solved this yet - and be willing to share this code? I would much appreciate.. John. __