Your question is 1s vs 0s Ratio Check. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
An NVIDIA Jetson device records a binary telemetry sequence, where 0 and 1 represent two event types. Determine whether the sequence contains exactly ten times as many 1s as 0s.
Return True if count(1) == 10 * count(0), and return False otherwise.
Implement a function that receives bits, a list of integers containing only 0 and 1. Return a Boolean value. The input is nonempty, and the order of elements does not affect the result.
def has_ten_to_one_ratio(bits):