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

  • Context: Calculators 
  • Thread starter Thread starter steezkraka
  • Start date Start date
  • Tags Tags
    Ti-89 Titanium
Click For Summary

Discussion Overview

The discussion revolves around using the "RandInt" function on the TI-89 Titanium calculator for programming a coin toss simulation. Participants explore how to implement random number generation for this purpose, comparing it to the TI-84 calculators used by others in their class.

Discussion Character

  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant asks how to enter the "RandInt" function in the program editor on the TI-89 Titanium for a coin toss program.
  • Another participant suggests using the "Rand" function, specifically "Rand(10)" for a random number between 1 and 10, indicating that the manual contains relevant information.
  • A participant expresses uncertainty about generating two numbers with "RandInt(0,1)" for simulating a coin flip, seeking clarification on achieving a 50% chance for heads or tails.
  • In response, another participant recommends using "Rand(2)" to generate a random integer between 1 and 2, implying this would suffice for the coin flip simulation.

Areas of Agreement / Disagreement

Participants present differing views on the appropriate function to use for simulating a coin toss, with some advocating for "RandInt" and others suggesting "Rand." The discussion remains unresolved regarding the best approach.

Contextual Notes

There is a lack of consensus on the specific implementation details for the coin toss program, and participants have not fully clarified the differences between "Rand" and "RandInt" in this context.

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.
 

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