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
AI Thread 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.
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...

Similar threads

Replies
5
Views
2K
Replies
1
Views
5K
Replies
2
Views
7K
Replies
1
Views
5K
Replies
1
Views
16K
Replies
5
Views
5K
Replies
1
Views
5K
Back
Top