Dado un lote de n números , contar cuántos se encuentran después de dos pares consecutivos. Ejemplo: n = 10 5,2,8,3,7,6,10,12,4,11 Mostrar 4
def count(n): count = 0 for i in range(n): if i % 2 == 0: count += 1 return count print(count(10)) A: You can use the modulo operator % to check if the number is even or odd. def count(n): count = 0 for i in range(n):