how would i write a program to find the average of 10 input random numbers? thanks in advance peeps

add up the numbers and divide by 10

smells like a homework assignment to me

yeah, my teacher isnt here and i didnt know how to do it thanks :slight_smile:

When I was in school, there was never a time when one of my teachers gave me an assignment like this, and said… “Don’t worry about trying to figure it out on your own, when I come back I’ll do it for you”…
And nobody here will do it for you either… What we will do, is help you once you have made an effort… Show us how you “think” it should be done, tell us why you thought it should have worked… Oh wait… THAT is what a teacher would do now isn’t it…

still nice to see that some teachers use xojo to teach programming !

it wasnt an assignment it was just work because the sub didnt know what to do but i worked it out in the end

Sounds like a very competent Sub

Or not.
The hardest part of that “assignment” should have been how to generate a random number properly.
and OH WAIT… The Language Ref shows you!

Let’s direct new users to the proper resources while remaining civil about it. One aspect that I appreciated the most when I began with Xojo was precisely the fact that I should not be afraid to ask “newbie questions”. Yes, “do your homework” is the right answer, but let’s remain the civil and welcoming group that we were and that attracted me in the first place.

Making someone feel dumb, unwelcome and generally unfit will not serve any productive purpose generally speaking and will not serve the purpose of making the language more widely accepted and used specifically.

The problem and the issue is that recently there has been a rash of people coming to this forum asking “C” or “Python” or other questions totally unrelated to “Xojo”… not to mention the “newbies”, who seem to come here with the expectation that they don’t have to do anything, that all their answers will be handed to them on a silver platter.

And in part this Forum itself is to blame, I have been a contributing member here for over 10 years, and I have helped (and been helped) more time than I can count, as have many others… And for the most part everyone has been willing to steer people in the right direction. But because of this “helpful” reputation that “we” have earned (unlike many other forums I could name), people are beginning to attempt to take advantage of this. All the members of this forum are volunteeers (I suspect that “forum duty” is not in the official job description for Norm, Greg and other Xojo engineers)… and as such each one of us has the ability and the right to decide which topics to contibute to or not.

So I don’t think helping someone “learn” by telling them to do some research, make an attempt at doing it them self is making them feel “dumb, unwelcome, or genernally unfit”. I think it is telling them that life is hard, and if they expect to thrive in this industry (or hobby depending on their point of view)… that at some point (like now), they need to do some work.

They are not ENTITLED to help or guideance from members of this forum, It is not a RIGHT, it is not promised by Xojo or anyone else.
But what they will get and have gotten is that guidance when they have proven they have made a valid attempt.

[quote=330635:@Dave S]They are not ENTITLED to help or guideance from members of this forum, It is not a RIGHT, it is not promised by Xojo or anyone else.
But what they will get and have gotten is that guidance when they have proven they have made a valid attempt.[/quote]
Exactly my opinion. This is a VERY helpful community and generally you’ll get help, and maybe even code, if the poster has made any attempt at looking at the documentation and/or searching the forum for similar issues.

Now, if the question had been something along the lines of, “I need to get the average of 10 numbers. I know I need an array to hold the values, and a for - next loop for the math but I’m having issues getting it to work right (and here’s the code I already have).” there would be zero issues here. The ‘do my homework for me’ questions aren’t going to get much response if adequate work hasn’t been put in beforehand. The goal of homework is to learn as much as you can and THEN ask questions if you can’t figure it out.

  • I fully agree with the message “go do your homework”. No need however to deride or mock the O.P. I am making a remark on the tone and the form of the answer, not on the substance.
  • I see an increasing number of posts with a questionable tone, some that border personal attacks (not in this thread, just to be clear), and I am concerned that this very helpful community may start to send the wrong message to newcomers.

Perhaps it is a culture gap. It remains that I would prefer to see a thread being ignored rather than seeing that we mock or deride somebody.

I agree. If you don’t like the thread, just don’t respond to it. Newbies don’t need berated by 10 regulars. As well as learning how to code, some people are only learning how to use a forum such as this one. Give new posters a little leeway.

Anyway, OP’s account is now disabled so that’s that.

I don’t like that this thread looks like a tribunal sitting in judgement of the OP. We may want to create a new thread about the same topic.