Post Reply 
(12C Platinum) Flip Virtual Coin
12-17-2018, 09:01 AM (This post was last modified: 12-17-2018 09:04 AM by Dieter.)
Post: #2
RE: (12C Platinum) Flip Virtual Coil
(12-17-2018 07:09 AM)Gamo Wrote:  This program allows you to flip a virtual coin by giving how many time you like to flip a coil then tell you how many time it was Head.

The random number generator produces either a 0 or a 1. So you do not have to check whether this is zero or not...

Code:
...
X=0
GTO 004
1
STO+1
GTO 004

...instead you can simply add this 0 or 1 to register 1. ;-)
Just replace the above code section with a simple STO+1.
And change GTO 026 into GTO 023 of course.

(12-17-2018 07:09 AM)Gamo Wrote:  The computation speed depending on how large the number of flip.
12C Platinum App will run much faster.

For a large number of n coin flips the head (and tail) count approaches n/2.
So you may use the following program for very large n instead:

Code:
รท
2
=
GTO 00

;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C Platinum) Flip Virtual Coin - Gamo - 12-17-2018, 07:09 AM
RE: (12C Platinum) Flip Virtual Coil - Dieter - 12-17-2018 09:01 AM



User(s) browsing this thread: 1 Guest(s)