[RESOLVED] Help with basic number average program
I have made a basic program that figures out averages for a single sport statistic such as goals, but i would like to incorporate ideas such as assists etc into the program but everything i have tried so far has given me multiple errors so I am deff not taking the right approach. Do I need to be running loops or what needs to happen so that once the average for goals has been computed that I can move on to assists etc?
Thank you in advance.
Re: Help with basic number average program
Do the same thing for assists that you do for goals. You'll need to be more descriptive about what you've tried and what went wrong if you need help.
Re: Help with basic number average program
I think he means "assists" in the sports sense, but I'm not sure how that helps to describe his problem.
Re: Help with basic number average program
Quote:
Originally Posted by
Lindley
I think he means "assists" in the sports sense, but I'm not sure how that helps to describe his problem.
I figured that out and changed my post. :)
Re: Help with basic number average program
My issue right now is when I try to do the same thing for other categories as I have for my first one the program will not even open and run. I am likely placing the code in the wrong areas, I am trying to have three categories for the statistics, it runs perfect with one category right now but I am having trouble figuring out where to place the code to do the next two categories.
Re: Help with basic number average program
Quote:
Originally Posted by
Ruthless
My issue right now is when I try to do the same thing for other categories as I have for my first one the program will not even open and run. I am likely placing the code in the wrong areas, I am trying to have three categories for the statistics, it runs perfect with one category right now but I am having trouble figuring out where to place the code to do the next two categories.
Okay, and since you haven't shown us what you're doing, what do you expect us to do to help you?
Re: Help with basic number average program
Great now format the code, copy and paste it back into the edit box, highlight it, and press the # key so that it is placed within code tags.
Re: Help with basic number average program
The code doesn't compile. You have fill_array implemented twice.
Re: Help with basic number average program
Quote:
Originally Posted by
GCDEF
The code doesn't compile. You have fill_array implemented twice.
Right, when I delete the last fill_array the program runs fine. But i am back to only handling one statistical category, do i need to write code in the first fill_array?
Very new to programming, thank you for your patience.
Re: Help with basic number average program
Quote:
Originally Posted by
Ruthless
Right, when I delete the last fill_array the program runs fine. But i am back to only handling one statistical category, do i need to write code in the first fill_array?
Very new to programming, thank you for your patience.
One of the features of a function is that you call it with different arguments so it performs the same operations on different data. Call it the first time passing in your goals array. Call it the second time passing in your assists array.
Re: Help with basic number average program
Quote:
Originally Posted by
GCDEF
One of the features of a function is that you call it with different arguments so it performs the same operations on different data. Call it the first time passing in your goals array. Call it the second time passing in your assists array.
Ok, thank you very much for your time and help. I understand what I need to do now. Thank you again, this thread can be closed.