Anderson Pozo

Generation

generate functionSat, 24 Jun 2023

Dada una lista de 10 números enteros. Calcular e informar el primer número par, el primer número primo.

list_of_numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] def first_even_number(lst): for item in lst: if item % 2 == 0: return item first_even_number(list_of_numbers)

Questions about programming?Chat with your personal AI assistant