Which of the following function gives information about top level data?

head
tail
summary
none of the mentioned

The correct answer is A. head.

head is a function that returns the first n elements of a list. It is often used to get a quick overview of the data in a list.

tail is a function that returns all but the first n elements of a list. It is often used to get the rest of the data in a list after you have already looked at the first few elements.

summary is a function that returns a summary of a list. It includes the number of elements in the list, the minimum and maximum values in the list, and the average value in the list.

none of the mentioned is not a valid option.

Exit mobile version