Java: 204 183 characters - 10 - 50 = 123
class K{public static void main(String[]y){int k,j,i=(int)(30*Math.random());for(j=0;j<30;j++,i+=Math.random()*29>=i?1:-1)for(k=0;k<31;k++)System.out.print(k==30?"\n":k==i?".":"_");}} First, this generates a number between 0 and 29 uniformly distributed:
i=(int)(30*Math.random()); I personally prefered if it would be normally distributed around 14.5, but my answer would be longer:
i=0;for(j=0;j<30;j++)i+=(int)(2*Math.random()); Second, this code ensures that it tends to be in the middle:
i+=Math.random()*29>=i?1:-1 The probability to get +1 is larger as smaller is the value of i, and we have the opposite for -1. If i is 0, the probability of getting +1 is 100%. If i is 29, the probability of getting +1 is 0%.
Third, by replacing the " " at the end by "_" to see the output easier, we see that each line has 30 characters plus a new line:
__________.___________________ _________.____________________ ________._____________________ _________.____________________ __________.___________________ ___________.__________________ __________.___________________ _________.____________________ ________._____________________ _________.____________________ ________._____________________ _________.____________________ __________.___________________ _________.____________________ __________.___________________ ___________.__________________ __________.___________________ _________.____________________ __________.___________________ ___________.__________________ ____________._________________ _____________.________________ ____________._________________ _____________.________________ ______________._______________ _____________.________________ ______________._______________ _______________.______________ ______________._______________ _____________.________________