[Tutor] I need help with my project

2018-11-28 Thread Treyton Hendrix
If the user selected a sandwich, french fries, and a beverage, reduce the total cost of the order by $1.00. This is what I have to do and I don't know where to start. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options:

Re: [Tutor] PEP 572 -- Assignment Expressions

2018-11-28 Thread Avi Gross
Ivo, One thing you could have done is explore with simpler code to see if you can deduce what is happening. If you opened your Python interpreter and tried to see what happens with a simplified variant like this, what do you get? if (match = 5) is not None: pass That might answer your question

Re: [Tutor] PEP 572 -- Assignment Expressions

2018-11-28 Thread Steven D'Aprano
On Tue, Nov 27, 2018 at 08:26:04PM -0500, Avi Gross wrote: > Ivo, You've replied to the wrong mailing list. Ivo wrote to Python-List, not Tutor. But now that you've raised the issue... [Ivo asked] >Why: > if (match := pattern.search(data)) is not None: ># Do someth

Re: [Tutor] I need help with my project

2018-11-28 Thread Sibylle Koczian
Am 28.11.2018 um 01:30 schrieb Treyton Hendrix: If the user selected a sandwich, french fries, and a beverage, reduce the total cost of the order by $1.00. This is what I have to do and I don't know where to start. Well, you are lucky. I just had my first mind-reading lesson today, you are my

Re: [Tutor] I need help with my project

2018-11-28 Thread Bob Gailer
On Nov 28, 2018 3:43 AM, "Treyton Hendrix" <2hendri...@stu.bps-ok.org> wrote: > > If the user selected a sandwich, french fries, and a beverage, reduce the > total cost of the order by $1.00. > > This is what I have to do and I don't know where to start. You start by learning how to ask effective

Re: [Tutor] I need help with my project

2018-11-28 Thread Alan Gauld via Tutor
On 28/11/2018 00:30, Treyton Hendrix wrote: > If the user selected a sandwich, french fries, and a beverage, reduce the > total cost of the order by $1.00. > > This is what I have to do and I don't know where to start. Neither do we because we don't know what you are talking about. There is no co

Re: [Tutor] I need help with my project

2018-11-28 Thread Avi Gross
I suggest starting at the beginning when asking a question to people who have no way of knowing what you have not told them. Your sentence is completely in middle or even near the end of something that has to be larger: " If the user selected a sandwich, french fries, and a beverage, reduce the to

[Tutor] user overloaded

2018-11-28 Thread Avi Gross
OOPS, Sorry Steve. Yes, I am on multiple mailing lists and the tutor list by default replies to the sender and you need to edit it to reply to the group. I will be careful. Your other point is broader. There are lots of operations (not just ion python) that are easy to misuse. Sometimes the same

Re: [Tutor] user overloaded

2018-11-28 Thread Steven D'Aprano
On Wed, Nov 28, 2018 at 12:56:32PM -0500, Avi Gross wrote: > try ... > except ValueError, e: > ... > > You now need to do this format: > > try ... > except ValueError as e: > ... > > Why the change? Because the first form was a trap and a bug magnet: try: block except TypeError, ValueErro

[Tutor] online interactive Py resource?

2018-11-28 Thread Mats Wichmann
I'm going to end up tutoring someone (family member) learning Python in the new year. Look forward to it. It will be a remote arrangement. Haven't trained anyone in the whole picture (as opposed to bits and bobs of possibly helpful advice on demand, like here) since I wrote and delivered a train