Tasks from University, please help me

  1. Write a predicate to find the type of data that has the largest number of list items (atom, number, structure, or free variable).
  2. Write the predicate get_simples (Term, Subterms) in such a way that it allows to find a list of simple subterms (not structured terms that do not have their own subterms, ie constants or variables) of a given term (among the arguments of term and arguments of its subterms).

Since this is a university problem I will not give you a working example but some help.

See: Verify Type of a Term

See: Built-in list operations

See: length/2

See: compound/1

See: +/1