import random
import numpy as np
import matplotlib.pyplot as plt

def descartes(ax, ran_x, ran_y, ax_title,x_label = "x", y_label = "y"):
    ax.set_xlabel(x_label, fontsize = 12)
    ax.set_ylabel(y_label, fontsize = 12)
    ax.set_xlim(ran_x[0], ran_x[1])
    ax.set_ylim(ran_y[0], ran_y[1])
    ax.set_title(ax_title, fontsize = 14)
    ax.grid()
    ax.axhline(0, color = "black")
    ax.axvline(0, color = "black")
    

fig = plt.figure(figsize = (5, 5))
ax = fig.add_subplot(111)

title1 = "Kyoto University 2024 Math qu.2 NO1"

zz=[[]]
xx=[[0,1],[2,3],[5,6],[7,8],[9,10]]
yy=[[2,3],[4,5],[6,7],[8,9],[10,11]]
for i in range(len(xx)):
    print(xx[i][0],xx[i][1],":",end="")
print(" ")
for j in range(len(yy)):
    print(yy[j][0],yy[j][1],":",end="")
print(" ")
for i in range(len(xx)):
    for j in range(len(yy)):
        zz.append([(xx[i][0]+yy[j][0])/2,(xx[i][1]+yy[j][1])/2])
del zz[0]
print(zz)

    


#descartes(ax, [0, tdice/10], [0, 2],title1)

#yy=probability
#xx = np.arange(len(yy))
#ax.plot(xx ,yy , color = "blue")

#y1=[1]*len(xx)
#ax.plot(xx ,y1 , color = "red")
#plt.show()