Posted: Mon Sep 15, 2008 10:01 am Post subject: I know this sounds silly but, can somebody help?
I work for a special needs school in Notts, UK. The school runs a house points system called WAM's (Worth a Mention) where students accumulate points for good behaviour, work, etc..... all the names are put into a hat one chosen who wins a prize. in the past it has just been a volunteer to choose a winner, The ICT teacher who runs it has asked to to look at doing a random name picker on the PC connected to a big screen, and the PC picks one of the name at random when a button is pressed. I did programming but, it was MANY years ago from what I do know i`m thinking should be fairly easy to do in a Visual Basic Program.
Can anyone offer any help not sure where to start.
You will require to program in any language. First write algorithm or psedu code then implement it
* You must have a database or any storage that will maintain all the names
* Get all names in some array.
* Randomize / unsort the array in new array. You may need 1 or more cycle like shuffling list
* Generate a new random number [index], muliplying, dividing, making hexa and again get a random number ranging within the length of array.
* Pick the element from array at above picked random number [index]
* That element will be the winner.
This is just a sample or startup. You may implement it in your own way.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum