What is difference between cube and square prism?

http://www.mathsisfun.com/geometry/prisms.html

A cube and a square prism are both three-dimensional geometric shapes, but they differ in terms of their faces, edges, and vertices.

A cube is a special type of square prism where all six faces are congruent squares. It has eight vertices and 12 edges. All edges of a cube have equal length, and all angles between the adjacent faces are right angles (90 degrees).

A square prism, on the other hand, has two congruent square bases and four rectangular faces connecting the bases. It also has eight vertices and 12 edges, just like a cube. However, the lengths of the sides and angles between faces in a square prism can be different. The bases of a square prism are always square, but the sides connecting them can have different lengths.

To visualize the difference, you can look at the shape itself. A cube will have equal lengths for all sides, and all angles between the faces will be right angles. A square prism, however, may have different side lengths and non-right angles between faces (except for the bases).

To summarize, while both a cube and a square prism have the same number of vertices and edges, a cube has congruent square faces and all right angles between these faces, while a square prism has two square bases and four rectangular faces connecting them, where the lengths of the sides and angles between the faces can vary.