Majority Majority
Elementary+
English
The mission is in Reviewing Mode. You can't see the solutions Leader Board, but you can see other user solutions through the Random Review after you solve the mission.

We have a List of booleans. Let's check if the majority of elements are true.

example

Some cases worth mentioning: 1) an empty list should return false; 2) if trues and falses have an equal amount, function should return false.

Input: A List of booleans.

Output: A Boolean.

Example:

is_majority([True, True, False, True, False]) == True
is_majority([True, True, False]) == True