lineas1()
lineas2()
x=random()*3
y=random()*3
if x>1 and x<2 and y>1 and y<2:
plt.plot(x,y,'or')
else:
plt.plot(x,y,'og')
lineas1()
lineas2()
N=100
for i in range(100):
x=random()*3
y=random()*3
if x>1 and x<2 and y>1 and y<2:
plt.plot(x,y,'or')
else:
plt.plot(x,y,'og')
lineas1()
lineas2()
N=100
cuenta=0
for i in range(N):
x=random()*3
y=random()*3
if x>1 and x<2 and y>1 and y<2:
plt.plot(x,y,'.r')
cuenta=cuenta+1
else:
plt.plot(x,y,'.g')
area=(cuenta/N)*9.0
print(area)