Ask your own question, for FREE!
Computer Science 12 Online
OpenStudy (anonymous):

Anyone want to help me with my Python assignment? I have a question.

OpenStudy (rsmith6559):

What's the question?

OpenStudy (anonymous):

I have to create a mini exel program. I must read numbers from a txt file and create a table. (Which I have done). I am having trouble returning a list of numbers so I can create a minimum function.

OpenStudy (anonymous):

I have the list, but I cannot return it correctly so I can use it in my min function.

OpenStudy (anonymous):

here is my code so far: http://pastebin.com/KBnXhNvU

OpenStudy (anonymous):

the file it is reading from looks like this: 1.2, 4.3, 1.2, 8.1 3.0, 5.0, 7.2, 4.9 4.0, 2.0, 0.5, 9.0 1.2, 4.3, 5.5, 2.7

OpenStudy (anonymous):

@rsmith6559 Let me know if you can help. I will pay if required.

OpenStudy (anonymous):

For one, I think I need to split the 'open_file' up into two separate functions. One to return a list, and the other to print a table.

OpenStudy (rsmith6559):

You won't have to pay. Where you are now, and what you have left to do looks like you started writing Python3 code before you fully broke the problem down. It looks like you'll need a few sub menus and many functions will need access to the data. Users are used to referring to columns as letters, so a mapping to integers that can be used for column indices will probably be needed. You'll probably end up with about 50 functions in this program.

OpenStudy (anonymous):

I must use python 3. And I know, I need a min, max, sort, and sum function.

OpenStudy (anonymous):

and a few others.

OpenStudy (anonymous):

Have you ran what i typed? Do you see what im talking about?

OpenStudy (rsmith6559):

Not just the obvious 12 menu functions, you open_file() function should be more like four different functions. Just displaying the menu and returning the user's input would be a function. You'll really fight this assignment if you try to short change it. Thoroughly decomposing the problem, and planning a solution will pay off by the time that you're done.

OpenStudy (anonymous):

Ok I will first create the menu into a function.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!