from math import* 
import numpy as np
import matplotlib.pyplot as pit
from mpl_toolkits.mplot3d import Axes3D
x=-1
y=-1
while x <= 1:
    while y <=1:
        z = x**2 + x * y + y**2
        print(f'x={x} y={y} z={z}')
        y+=0.5
        y=-1
        x+=0.5
fig=pit.figure()
ax=fig.add_subplot(111, projection='3d')
X = np.arange(-1 , 1.5, 0.5)
Y = np.array(X)
X, Y = np.meshgrid(X, Y)
print(X)
Z= X**2 + X * Y + Y**2
ax.plot_surface(X, Y, Z)
pit.show()