|
-
December 2nd, 2010, 03:25 PM
#1
[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.
-
December 2nd, 2010, 03:28 PM
#2
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.
-
December 2nd, 2010, 03:33 PM
#3
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.
-
December 2nd, 2010, 03:35 PM
#4
Re: Help with basic number average program
 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.
-
December 2nd, 2010, 03:46 PM
#5
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.
-
December 2nd, 2010, 04:07 PM
#6
Re: Help with basic number average program
 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?
-
December 2nd, 2010, 04:18 PM
#7
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.
-
December 2nd, 2010, 04:26 PM
#8
Re: Help with basic number average program
The code doesn't compile. You have fill_array implemented twice.
-
December 2nd, 2010, 04:33 PM
#9
Re: Help with basic number average program
 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.
-
December 2nd, 2010, 04:36 PM
#10
Re: Help with basic number average program
 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.
-
December 2nd, 2010, 04:43 PM
#11
Re: Help with basic number average program
 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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|