[Tutor] I need help with my project

Avi Gross avigross at verizon.net
Wed Nov 28 11:44:28 EST 2018


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
total cost of the order by $1.00."

It sounds like you are being asked to emulate a place you can buy food. So I
suspect you need to display a menu, ask the user to enter info, keep a
running total and so on.

So how do you think you would store the order as well as whatever you need
to know about past sales or the non-discounted cost of the current order?
How do you see if the current order has all the parts needed for the
discount. Do you need to apply the discount just once or multiple times if
they ordered food for lots of people? 

Sure, we could write some code for you, but perhaps you need to think it
through first and maybe if you get stuck, ask if someone can tell you what
is wrong with the code.

Given what you sent, the answer is easy.

RECOGNIZE they placed an order that meets the criterion:
SUBTRACT 1.00 from their order.

But that is not written in Python for obvious reasons.


-----Original Message-----
From: Tutor <tutor-bounces+avigross=verizon.net at python.org> On Behalf Of
Treyton Hendrix
Sent: Tuesday, November 27, 2018 7:30 PM
To: tutor at python.org
Subject: [Tutor] I need help with my project

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 at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list