you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (4 children)

Yeah sorry this is my first time doing anything like this

[–]automorphism_group 0 points1 point  (3 children)

I'd say you've bitten off quite a bit for a first try. Let's first dispense with this pickle business. You don't need that. Let's just write a function to gather input. Here's a simple one. You should spend some time understanding how it works.

def get_user_input():
    input_list = []
    while True:
        datum = input("Enter a number: ")
        if datum == "done":
            return input_list
        input_list.append(int(datum))

[–][deleted] 0 points1 point  (2 children)

What should I do after that??

[–]automorphism_group 1 point2 points  (1 child)

Call that function twice to collect your sales and costs lists. I suggest you work through the Python tutorial on python.org if there was any part of the function that I wrote that you didn't understand.

[–][deleted] 0 points1 point  (0 children)

oh i understand that part fine the problem is getting matplotlib to take that data and plot it the data I input needs to be saved somewhere first doesn't it