How do I use the RandInt function on my TI-89 titanium for a coin toss program?

In summary, the conversation discusses the use of the TI-89 titanium calculator and the function "RandInt" for a coin tossing program. The individual is unsure of how to enter the function onto the program editor and asks for help. Another person suggests using the function "Rand([int])" and explains how to get a random number between two specified values. The conversation also mentions the possibility of finding two numbers and using the function "Rand(2)" for a 50% chance of heads or tails in a coin flip simulation.
  • #1
steezkraka
2
0
TI-89 titanium "RandInt"?

for my class we did a quick programming of a coin toss, everyone else has TI-84s and I have the 89 titanium.

How do I go about entering the function "RandInt" onto the program editor?

Help is greatly appreciated!

P.S. anyone who knows where I could download a quick coin toss code sript? that would be great as well!
 
Computer science news on Phys.org
  • #2
steezkraka said:
for my class we did a quick programming of a coin toss, everyone else has TI-84s and I have the 89 titanium.

How do I go about entering the function "RandInt" onto the program editor?

Simple, if you looked in your manual you would see a function called "Rand([int])". So, to get a random number between 1 and 10 for example, just put Rand(10) in. For a random number between 1 and 54678 just put in Rand(54678). etc.
 
  • #3
Yes, but what if I wanted to find two numbers? such as RandInt (0,1) ? I'm not sure if I'm explaining this very well, but I'm just trying to write a program that would simulate a coin flip, with it being 50% chance Heads/Tails.
 
  • #4
steezkraka said:
Yes, but what if I wanted to find two numbers? such as RandInt (0,1) ? I'm not sure if I'm explaining this very well, but I'm just trying to write a program that would simulate a coin flip, with it being 50% chance Heads/Tails.

So just call Rand(2). It will give you a random interger between 1 and 2; I think you can see how many that is.
 

1. How do I use the RandInt function on my TI-89 titanium calculator?

To use the RandInt function on your TI-89 titanium calculator, simply press the "Math" button, then select "Probability" and choose "RandInt" from the list of options. You will then be prompted to enter the range of numbers you want to generate.

2. Can I generate random integers with decimals using the RandInt function?

No, the RandInt function on the TI-89 titanium calculator only generates whole numbers. If you need to generate random decimals, you can use the Rand function instead.

3. How many random integers can the TI-89 titanium calculator generate with the RandInt function?

The TI-89 titanium calculator can generate up to 999 random integers at a time using the RandInt function. If you need to generate more numbers, you can use a loop or repeat the function multiple times.

4. Does the RandInt function on the TI-89 titanium calculator allow for non-integer intervals?

Yes, you can enter non-integer intervals for the RandInt function on the TI-89 titanium calculator. For example, if you want to generate random numbers between 1 and 5.5, you can enter "1, 5.5" as the range.

5. Can I use the RandInt function to generate random integers in a specific order?

No, the RandInt function on the TI-89 titanium calculator generates random integers in a random order. If you need to generate numbers in a specific order, you can use the Sort function after generating the random numbers.

Similar threads

  • Computing and Technology
Replies
1
Views
4K
  • Computing and Technology
Replies
2
Views
6K
  • Computing and Technology
Replies
1
Views
16K
  • Computing and Technology
Replies
5
Views
5K
  • Computing and Technology
Replies
1
Views
5K
  • Computing and Technology
Replies
1
Views
4K
  • Computing and Technology
Replies
1
Views
4K
  • Computing and Technology
Replies
2
Views
5K
  • Computing and Technology
Replies
8
Views
45K
  • Computing and Technology
Replies
1
Views
4K
Back
Top