Hello, I've been working one a game, and I need a random number generation to randomize the questions' order and which ones come up. I have tried using the random integer no repeating generator on my Ti-84+ SE, but the numbers are always the same, even when I change the seed? Please help!
Can you show us what the code is? It sounds like your not making a list
The Silver Phantom welcomes you
Are you searching for randInt(minValue, maxValue)?
to generate a random number from 1-4, which will be stored to A.
Get futuristicOS 8 for your TI-84+
Learn more about futuristicOS 8
here's what is happening. I am storing the numbers to L6, and they come out the same every time, even when i tell the calculator to clear the list.
UPDATE: I can get the numbers to stop coming out the same, but now they repeat. I don't know what to do.
You do know that randIntNoRep( creates a list of integers that do not repeat, right? For example, randIntNoRep(0,7) creates a list containing integers 0 to 7 in a randomized order. randInt(0,7,8 on the other hand makes an 8 element list of numbers ranging from 0 to 7 that can contain repeated numbers. Because of the nature of the algorithm used to create the 'random' numbers, the only way you should be getting the same result each time is if you are storing a rand seed. For most purposes, you do not want to store to rand.
47%? Take a look and try to imagine how cool 100% will be. This has won zContest 2011 and made news on TICalc. This compromise between Assembly and BASIC parses like BASIC and is fast like assembly. Grammer 2
Here is one test of the program:
the code i am using to generate the numbers, then store them to L6:
The labels 1-15 will just ask a question, then send the program back to Lbl Theta.
If anyone can help me with this, that would be great. Thanks.
With the structure that you are suggesting, it would be much better if you instead used a For( loop. In pseudo-code:
Generate List of randomly ordered consecutive integers For(A,1,length of List Ask question End
If you want to make a randomized list of non-repeating consecutive integers, you can easily do this with (as Xeda pointed out) randIntNoRep(, but if you do not have that command, the appropriate use of SortA(, rand, and seq( will do the same.
1. I do have the command, as it is in the code.
2. What you are saying is confusing me, in terms of the for( loop.
In that case, you should probably read the For( page. The page describes how it works, and I think you will find that it fits your situation perfectly.
Btw where do you save the questions and answers, I guess in strings or in one String?
@Xeda: I see that you always have hyperlinks to the wikipages, when you post a command.
How do you do this?
Are you doing this by writing: ?
Or is there any way to do this faster? I would also like to give every command I post, a link to the wikipage, but if I always have to write it like above, I dont want anymore. (My laziness be praised.)
Wake me, when you need me.
That will produce a link to the wiki page randIntNoRep(.
Just do this for others:
Or, without anchor text:
:ClrHome:Disp "HOW DOES A","MATHEMATICIAN","LOSE WEIGHT? :Pause " :Pause "BINOMIALS! :Pause "(BUY NO MEALS)":ClrHome