[Tutor] Problems with Looping

2018-03-26 Thread David Brown
Hello all, I am trying to teach myself Python by working through a book on Safari Books. One of the examples in the chapter on Loops states: *"Write a program that simulates a fortune cookie. The program should display one of five unique fortunes, at random, each time it’s run."* The program bel

Re: [Tutor] Problems with Looping

2018-03-26 Thread Joel Goldstick
On Mon, Mar 26, 2018 at 9:45 AM, David Brown wrote: > Hello all, > > I am trying to teach myself Python by working through a book on Safari > Books. One of the examples in the chapter on Loops states: > > *"Write a program that simulates a fortune cookie. The program should > display one of five u

Re: [Tutor] Tutor Digest, Vol 169, Issue 20

2018-03-26 Thread David Brown
Thanks Joel. That got me going in the right direction. I ended up using a "while true" statement. The code below seems to work now. It will accept any key and not just "Y". Haven't gotten that far with it yet. # Fortune Cookie # Displays Random Fortune # Allows user to see repeated fortunes up to

Re: [Tutor] Tutor Digest, Vol 169, Issue 20

2018-03-26 Thread Alan Gauld via Tutor
First of all, please do not repost the entire digest - we have all already seen them - and some people pay by the byte. Secondly... On 26/03/18 21:44, David Brown wrote: > Thanks Joel. That got me going in the right direction. I ended up using a > "while true" statement. The code below seems to