Re: [Tutor] looping - beginner question

2017-03-02 Thread leam hall
On Thu, Mar 2, 2017 at 8:42 AM, Rafael Knuth wrote: > I wrote a program that is supposed to take orders from customers in a bar. > If the desired drink is available, the customer will be served. If > not, he will be informed that the drink is not available. This is what > I wrote: > > bar = ["bee

Re: [Tutor] looping - beginner question

2017-03-02 Thread Mats Wichmann
On 03/02/2017 08:06 AM, Alan Gauld via Tutor wrote: > On 02/03/17 13:42, Rafael Knuth wrote: > >> bar = ["beer", "coke", "wine"] >> >> customer_order = input("What would you like to drink, dear guest? ") >> >> for drink in bar: >> if customer_order != drink: >> print ("Sorry, we don't

Re: [Tutor] looping - beginner question

2017-03-02 Thread Alan Gauld via Tutor
On 02/03/17 13:42, Rafael Knuth wrote: > bar = ["beer", "coke", "wine"] > > customer_order = input("What would you like to drink, dear guest? ") > > for drink in bar: > if customer_order != drink: > print ("Sorry, we don't serve %s." % customer_order) > else: > print ("Su

[Tutor] looping - beginner question

2017-03-02 Thread Rafael Knuth
I wrote a program that is supposed to take orders from customers in a bar. If the desired drink is available, the customer will be served. If not, he will be informed that the drink is not available. This is what I wrote: bar = ["beer", "coke", "wine"] customer_order = input("What would you like