The year is 2060, and Tim is a domestic robot within a UK household. He often hears the humans philosophising thus – “Beer before wine, you’ll be fine; Wine before beer, oh dear.” He needs your help in testing this logic for himself.
You will be given an array of numbers, each value representing the alcoholic percentage of a certain drink. Using the following set of rules, write a function that can give an accurate outcome for the sequence of drinks.
Any value equal to or less than 8 represents beer / Beer 15
Any other value (so, more than 8, but less than or equal to 15), represents wine / 8 < Wine