Computers & Internet Logo

Related Topics:

Posted on Aug 23, 2011
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Simulate the process of dealing cards from a 52-card deck by generating 1,000 random integers in the range 1 to 52. Assume that numbers 1 to 13 represents clubs, 14 to 26 represents diamonds, 27 to 39 represents hearts, and 40 to 52 represents spades. Display the number of times each suit occurred in the 1,000 deals.

1 Answer

Paul Chana

Level 3:

An expert who has achieved level 3 by getting 1000 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Master:

An expert who has achieved Level 3.

  • Master 576 Answers
  • Posted on Sep 30, 2015
Paul Chana
Master
Level 3:

An expert who has achieved level 3 by getting 1000 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Master:

An expert who has achieved Level 3.

Joined: Nov 07, 2013
Answers
576
Questions
0
Helped
139878
Points
1192

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

0helpful
1answer

How do I generate a random number that is greater than 1 on a casio fx-300MS

The random number function always generates a number between zero and one. You can convert this to a random number in any range by a suitable combination of multiplications and additions. For example, if you want a random number between zero and ten, multiply the generated random number by 10. If you want a random number between one and ten, multiply the generated random number by 9 and then add 1.

If you want to simulate the roll of a six-sided die, multiply the generated random number by 6, add 1, and ignore the fractional portion. This will give you a 1, 2, 3, 4, 5, or 6 with more-or-less equal probability.
2helpful
1answer

How do i generate random integers with a ti 89 titanium?

Use the rand() function. If you give it a positive integer argument n, it will return a random integer in the range in the interval [1, n]. You'll find rand() in the MATH/PROBABILITY menu.
1helpful
1answer

When i press the shift key then the divide button, i get a probability working out, but what does the c stand for??

The C stands for "Combinations." nCr is the number of combinations of n items taken r at a time. For example, 52 C 13 is the number of different 13-card hands you can deal out of a deck of 52 cards, assuming the order of the deal is immaterial.

nPr ("Permutations") just to the left does take the order into account.
0helpful
1answer

How do I program the calculator to read random numbers 1-50?

The post answer the question concerning how to generate random integers. The example given is for rolling a dice. I am inserting the modification that treats your case at the end.

The random number generator function is called Ran# and can be accessed in RUN mode by pressing:
[OPTN] [F6] [F3] (PROB) [F4] to access the (Ran#) function
In the paragraph above, the bold text in square brackets indicates keypresses, while the text in parentheses represents the menus that appear at the bottom of the calculator screen. This also assumes there are no menus on the bottom of the screen when you begin. If PROB is already on the screen, then the [F6] key is not necessary, just press [F3] then [F4] at this point.

The Ran# function generates a random decimal number between 0 and 1. If you need to generate a number with a higher range, then there may be extra steps involved. For example, to choose a random number between 0 and 100, you would enter:
Ran#×100 or Ran#(100)

ec9c0df.jpg
Let's say you want to simulate a dice roll, where you get an integer between 1 and 6. Your first step would be to do:
Ran#×6
This will give you a random decimal number between 0 and 6. But we need an integer, not a decimal. To make it an integer, you would change this to:
Int(Ran#×6)

Press [OPTN] [F6] [F4] (NUM) [F2] to access the (Int)

This now gives you an integer between 0 and 5. We just need to add 1 to the result.
Int(Ran#×6)+1
The result should be an integer between 1 and 6.

04419d1.jpg
To generate random number between 1 and 50
Int(Ran#×50)+1

12helpful
1answer

How do i generate random numbers on the casio fx-9860G

The random number generator function is called Ran# and can be accessed in RUN mode by pressing:
[OPTN] [F6] [F3] (PROB) [F4] to access the (Ran#) function
In the paragraph above, the bold text in square brackets indicates key presses, while the text in parentheses represents the menus that appear at the bottom of the calculator screen. This also assumes there are no menus on the bottom of the screen when you begin. If PROB is already on the screen, then the [F6] key is not necessary, just press [F3] then [F4] at this point.

The Ran# function generates a random decimal number between 0 and 1. If you need to generate a number with a higher range, then there may be extra steps involved. For example, to choose a random number between 0 and 100, you would enter:
Ran#×100 or Ran#(100)

ec9c0df.jpg
Let's say you want to simulate a dice roll, where you get an integer between 1 and 6. Your first step would be to do:
Ran#×6
This will give you a random decimal number between 0 and 6. But we need an integer, not a decimal. To make it an integer, you would change this to:
Int(Ran#×6)

Press [OPTN] [F6] [F4] (NUM) [F2] to access the (Int)

This now gives you an integer between 0 and 5. We just need to add 1 to the result.
Int(Ran#×6)+1
The result should be an integer between 1 and 6.

04419d1.jpg
5helpful
1answer

I have a casio fx9750GA plus and need to know how to generate random numbers. I have had a quick look at users manual but can't find it. Can you help?

The following uses keystrokes and screen captures from the FX-9750GII but the essential information is the same. Use the F6 key to move to next page of TABS (those at the bottom of screen) until you find the TAB that interests you (PROB, RAND#, INT, etc.)

The random number generator function is called Ran# and can be accessed in RUN mode by pressing:
[OPTN] [F6] [F3] (PROB) [F4] to access the (Ran#) function
In the paragraph above, the bold text in square brackets indicates key presses, while the text in parentheses represents the menus that appear at the bottom of the calculator screen. This also assumes there are no menus on the bottom of the screen when you begin. If PROB is already on the screen, then the [F6] key is not necessary, just press [F3] then [F4] at this point.

The Ran# function generates a random decimal number between 0 and 1. If you need to generate a number with a higher range, then there may be extra steps involved. For example, to choose a random number between 0 and 100, you would enter:
Ran#×100 or Ran#(100)

ec9c0df.jpg
Let's say you want to simulate a dice roll, where you get an integer between 1 and 6. Your first step would be to do:
Ran#×6
This will give you a random decimal number between 0 and 6. But we need an integer, not a decimal. To make it an integer, you would change this to:
Int(Ran#×6)

Press [OPTN] [F6] [F4] (NUM) [F2] to access the (Int)

This now gives you an integer between 0 and 5. We just need to add 1 to the result.
Int(Ran#×6)+1
The result should be an integer between 1 and 6.

04419d1.jpg
0helpful
1answer

Generating radom itegers

The random number generator function is called Ran# and can be accessed in RUN mode by pressing:
[OPTN] [F6] [F3] (PROB) [F4] to access the (Ran#) function
In the paragraph above, the bold text in square brackets indicates keypresses, while the text in parentheses represents the menus that appear at the bottom of the calculator screen. This also assumes there are no menus on the bottom of the screen when you begin. If PROB is already on the screen, then the [F6] key is not necessary, just press [F3] then [F4] at this point.

The Ran# function generates a random decimal number between 0 and 1. If you need to generate a number with a higher range, then there may be extra steps involved. For example, to choose a random number between 0 and 100, you would enter:
Ran#×100 or Ran#(100)

ec9c0df.jpg
Let's say you want to simulate a dice roll, where you get an integer between 1 and 6. Your first step would be to do:
Ran#×6
This will give you a random decimal number between 0 and 6. But we need an integer, not a decimal. To make it an integer, you would change this to:
Int(Ran#×6)

Press [OPTN] [F6] [F4] (NUM) [F2] to access the (Int)

This now gives you an integer between 0 and 5. We just need to add 1 to the result.
Int(Ran#×6)+1
The result should be an integer between 1 and 6.

04419d1.jpg
8helpful
2answers

How to use the random number generator on the calculator.

Hello,
To access the Random number generator, press [MENU], Use arrows to select [RUN] and press [EXE].
In [RUN] press [OPTN][F6:->] to pan to the right then press [F3:PROB] then [F4:RAND#]. The command echoes on the screen.
  1. Now if you press [EXE] a number between 0 and 1 is generated.
  2. Each time you press [EXE] a new number is generated.
Although it is not documented, I found out that if you enter RAND#(n) where n is an integer, it generates a number between (0 and n)

Hope it helps.

1helpful
1answer

Ran#

A random number generator exists on this calculator. It is accessible in RUN or PGRM modes by pressing the OPTN key. If you don not see a tab PROB at the bottom of screen, press the rightmost key to move to next page.

Anyway, RAND# generates a real number between 0 and 1.

For other numbers read on.

The Ran# function generates a random decimal number between 0 and 1. If you need to generate a number with a higher range, then there may be extra steps involved. For example, to choose a random number between 0 and 100, you would enter:
Ran#×100 or Ran#(100)

ec9c0df.jpg
Let's say you want to simulate a dice roll, where you get an integer between 1 and 6. Your first step would be to do:
Ran#×6
This will give you a random decimal number between 0 and 6. But we need an integer, not a decimal. To make it an integer, you would change this to:
Int(Ran#×6)

[OPTN].......(NUM) [F2] to access the (Int)

This now gives you an integer between 0 and 5. We just need to add 1 to the result.
Int(Ran#×6)+1
The result should be an integer between 1 and 6.

04419d1.jpg
0helpful
2answers

Statistics

Random number generators on computers are not really random. They need to be "seeded". If you seed the random number generator with the same seed each time you will generate the same list of numbers. A common technique in computer programming is to seed the random number generator with a value like the number of seconds that has occurred since midnight. This gives you the illusion of real random numbers.

Look up the word "Seed" in your calculator documentation and it will most likely tell you how this is accomplished on the TI calculators.
Not finding what you are looking for?

936 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...