Skip to content

It is possible to land a the coin on its side. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

It is possible to land a the coin on its side. #1

wants to merge 1 commit into from

Conversation

ShaneWD
Copy link

@ShaneWD ShaneWD commented Dec 4, 2020

- According to the following study, a nickel can land on its side 1 out of 6000 times: https://ui.adsabs.harvard.edu/abs/1993PhRvE..48.2547M/abstract . I added this feature to the code. It chooses a number out of 6000, if it is less than 3000, it is tails, and if it is more than 3,000 it is heads. However, if the number is exactly 3000, this means that the coin landed on its side. 
- I also put the bulk of the code in a while loop so the user does not have to restart the program every single time.
- Lastly, now the program does not crash if the user types in an invalid value. It now just asks the user to type in a valid number, and then it loops back. 

(p.s, a seed isn't really random, because a seed value of, let's say 7, will get you the same outcome every time. It should choose a random number/outcome without the seed being a variable)

    - According to the following study, a nickel can land on its side 1 out of 6000 times: https://ui.adsabs.harvard.edu/abs/1993PhRvE..48.2547M/abstract . I added this feature to the code. It chooses a number out of 6000, if it is less than 3000, it is tails, and if it is more than 3,000 it is heads. However, if the number is exactly 3000, this means that the coin landed on its side. 
    - I also put the bulk of the code in a while loop so the user does not have to restart the program every single time.
    - Lastly, now the program does not crash if the user types in an invalid value. It now just asks the user to type in a valid number, and then it loops back. 

(p.s, a seed isn't really random, because a seed value of, let's say 7, will get you the same outcome every time. It should choose a random number/outcome without the seed being a variable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant