On Fri, Mar 24, 2017 at 9:05 AM, Rafael Knuth wrote:
> I have another question :)
> I noticed that you split your class into three methods:
>
> def __init__(self):
> # initialize instances of class
>
> def make_shopping_list(self):
> # input
>
> def display_shopping_list(self):
> # output
>
> I wa
On Fri, Mar 24, 2017 at 6:51 AM, Rafael Knuth wrote:
> Thank you so much for your help.
> I have a question: When creating an instance of GroceryListMaker, you are
> using:
>
> if __name__ == "__main__":
>
> What is that specifically for?
> I tested your code and both worked, with and without
> i
On 24/03/17 21:42, boB Stepp wrote:
>> I noticed that you split your class into three methods:
Many real world classes have a lot more than 3 methods.
>> def __init__(self):
>> # initialize instances of class
>>
>> def make_shopping_list(self):
>> # input
>>
>> def display_shopping_list(self):
>
On 24/03/17 21:41, boB Stepp wrote:
>> I have a question: When creating an instance of GroceryListMaker, you are
>> using:
>>
>> if __name__ == "__main__":
>>
>> What is that specifically for?
Its a common trick in Python that enables a single file to
act as both a module and a program. When a s
I'm forwarding this to Tutor. Please respond to the whole group and
not just me personally, so you can have access to the experts as well
as allowing all of us learners the opportunity to learn more.
On Fri, Mar 24, 2017 at 9:05 AM, Rafael Knuth wrote:
> I have another question :)
> I noticed th
I'm forwarding this to Tutor. Please respond to the whole group and
not just me personally, so you can have access to the experts as well
as allowing all of us learners the opportunity to learn more. I can't
respond now, but will try to do so later.
On Fri, Mar 24, 2017 at 6:51 AM, Rafael Knuth
On 22/03/17 12:30, Rafael Knuth wrote:
> I wrote a function that does exactly what I want, and that is:
> Create a shopping list and then let the user decide which items (food)
> are supposed to be instantly consumed and which ones stored.
That's a good start, because it means you understand your
On 03/22/2017 06:30 AM, Rafael Knuth wrote:
> thanks for your feedback! @boB
>
> I wrote a function that does exactly what I want, and that is:
> Create a shopping list and then let the user decide which items (food)
> are supposed to be instantly consumed and which ones stored.
>
> def ManageFoo
On Wed, Mar 22, 2017 at 7:30 AM, Rafael Knuth wrote:
> thanks for your feedback! @boB
> ...(it does what it's
> supposed to do, but not sure if a pro would write it same way I did).
I'll leave it to others to evaluate your function which I snipped as I
am not a pro! ~(:>))
>
> Besides that, I w
thanks for your feedback! @boB
I wrote a function that does exactly what I want, and that is:
Create a shopping list and then let the user decide which items (food)
are supposed to be instantly consumed and which ones stored.
def ManageFood():
create_shopping_list = []
prompt = ("Which fo
On Tue, Mar 21, 2017 at 12:20 PM, Rafael Knuth wrote:
>
> While writing the parent class, I ran into the following issue:
> How do I properly declare a variable that takes user input?
> Do I write methods in the same fashion like in a regular function?
> And how do I call that class properly?
Wh
I am trying to write a food shopping list.
The user should be able to add items to that shopping list, and later
on decide what should happen to those purchased foods: instantly
consumed or stored.
My initial idea was to create a parent class to populate the shopping
list and a child class to mana
12 matches
Mail list logo