Simonecimolato_point_probability/point_probability/point_probability.pde
int countsx = 0;
int countdx = 0;
int perc = 75; //probability of finding the dot on the left side

void setup() {
  size(800, 800);
  background(51);
  noSmooth();
  stroke(255, 0, 0);

  line(width/2, 0, width/2, height);
  stroke(255);
}

void draw() {
  int i = 0;
  while (i<1000) {
    int side = round(random(1, 100));
    if (side <= perc) {
      point(random(0, width/2), random(0, height));
      countsx++;
    } else {
      point(random(width/2, width), random(0, height));
      countdx++;
    }
    i++;
  }
  println(countsx, countdx, (float)countsx/countdx);
}
