Define a valid object as one that contains the following properties: a handle, a container, two circular openings, and a shape that ensures stability when placed on a flat surface. We can use a loop to check if the given object meets each of these criteria, returning true (valid object) or false (invalid object) as needed.
Given an input object, create an algorithm to determine if the object is valid.
Mug