'How do I create a function that simulates the creation of a bit and each time you call the function, the result is either 1 or 0
Create a function that simulates the creation of a bit. Each time you call the function, the result is either 1 or 0.
Then use your function to create 1000 bits and document how many times the outcome was 1 and how many times it was 0.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
