Skip to content

Instantly share code, notes, and snippets.

@hathawsh
Last active Feb 25, 2020
Embed
What would you like to do?
Experiment with quantum entanglement
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