Last active
February 25, 2020 22:55
-
-
Save hathawsh/6d1234c1abe6eeec785d7997fe4f666f to your computer and use it in GitHub Desktop.
Experiment with quantum entanglement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
earth_total = 0 | |
ship_total = 0 | |
for particle in range(1000): | |
earth_result = random.random() >= 0.5 | |
if earth_result: | |
ship_result = random.random() >= 0.6 | |
else: | |
ship_result = random.random() >= 0.4 | |
earth_total += earth_result | |
ship_total += ship_result | |
print("Earth: {}, Ship: {}".format(earth_total, ship_total)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment