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

  • Thread starter Thread starter steezkraka
  • Start date Start date
  • Tags Tags
    Ti-89 Titanium
Click For Summary
To program a coin toss on the TI-89 Titanium, users can utilize the function "Rand" instead of "RandInt." The "Rand" function generates a random number between 0 and a specified integer. For simulating a coin flip, entering "Rand(2)" will yield a random integer of either 1 or 2, effectively representing Heads or Tails with a 50% chance for each outcome. This method simplifies the process of generating random numbers for programming tasks on the TI-89 Titanium. Additionally, there is a request for downloadable coin toss code scripts, though no specific sources are provided in the discussion.
steezkraka
Messages
2
Reaction score
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
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.
 
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.
 
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.
 
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
17K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 8 ·
Replies
8
Views
47K