I want to make a project that orders inputed numbers in ascending order but what i did is said "when 0 key pressed add 0 to active input". I did that for all numbers. When i enter two numbers it come up as 2 then below it 3 in the active input list. Then when you press space it adds active input to a list called input which is where it stores all of the inputs. But what happens is when i puts say 2 and 3 in instead of being 23 is comes up as 2 3 which you can't say if it is greater or less than anything else. Anyone got an answer to my problem.
Offline
I'm not sure I exactly understand your problem...it sounds like you are trying to use a list to collect digits of a number and then using the full contents of the list to make a number in a variable (or another list element). And you are running into the problem that you end up with spaces between the list elements. I have not figured out a way to remove those spaces; sorry.
To input a multi-digit number, I initialize a variable to 0 and then, for each digit key, have it set the variable to the current value of the variable multiplied by 10 plus the value of the digit:
Set Variable = (10 * Variable) + Digit key pressed
So if the key "2" was pressed you would get
Variable = (10 * 0) + 2 = 2
And then the key "3" was pressed you would get
Variable = (10 * 2) + 3 = 23
So the multi-digit number is taking form in Variable
Offline
ok thanks do you know of any other free software that is targeted at mathematical equations. My project would be to find the mean, median, and mode of a list of data. I thought that it was time consuming doing it on your own but it would be simple in a program. If you know of any programming languages let me know.
Thanks,
Thelasthorizon
Offline
thelasthorizon wrote:
ok thanks do you know of any other free software that is targeted at mathematical equations. My project would be to find the mean, median, and mode of a list of data. I thought that it was time consuming doing it on your own but it would be simple in a program. If you know of any programming languages let me know.
Thanks,
Thelasthorizon
Python is free and has lists. It is a text based language but fairly forgiving to use.
Offline
speaking of mean, median, and mode, I made a project to calculate just that.
http://scratch.mit.edu/projects/bhz/349843
Offline