You need to write three functions named NUMBER-OF-HITS, BATTING-AVERAGE, and ON-BASE-PERCENTAGE to compute the first three of these values respectively. The function NUMBER-OF-HITS should take the number of singles, doubles, triples, and home runs as arguments. The BATTING-AVERAGE function should take all those, plus another parameter for number of at-bats. The ON-BASE-PERCENTAGE function should take all those parameters, plus an additional parameter for the number of walks. These functions MUST take these in the order specified here, e.g. OBP must take its parameters in the order singles, doubles, triples, home-runs, at-bats, walks.
If you are wanting some more practice, try to compute the slugging percentage. It will require the same arguments as batting average. If you do this, try to write a predicate called "BABE-RUTH-P" which will return T or NIL based on if a hitter's SP is greater than .750.