Need advice how to create Hexagonal prism

Good morning,

Thank you for your answer yesterday I finally manage to use the function and I placed the function where you told me.

But I guess now I have to create another function and change the y coordinate in order to have this shape?

Otherwise I think I will get only this?

Thank you
Helen