using various inbuild functions to solve given questions