# 02
#def eh_par(num):
# return num % 2 == 0
#print(eh_par(7))
# 03
#def maior_numero(a, b):
# return a if a > b else b
#print(maior_numero(10, 20))
# 04
#def media(lista):
# return sum(lista) / len(lista)
#print(media([1, 2, 3, 4, 5]))
# 05
#def contar_vogais(texto):
# vogais = "aeiouAEIOU"
# return sum(1 for letra in texto if letra in vogais)
#print(contar_vogais("Antologico"))
# 06
#def inverter_string(texto):
# return texto[::-1]
#print(inverter_string("hello"))
# 07
#def quadrados(n):
# return[x ** 2 for x in range(1, n+1)]
#print(quadrados(5))
# 08
#def filtrar_pares(lista):
# return[x for x in lista if x % 2 == 0]
#print(filtrar_pares([1, 2, 3, 4, 5, 6, 7, 8]))
# 09
#dobro = lambda x: x * 2
#print(dobro(7))
# 10
#eh_positivo = lambda x: x > 0
#print(eh_positivo(-3))
# 12
#celsius = [0, 10, 20, 30]
#fahrenheit = list(map(lambda c:(c * 9/5) + 32, celsius))
#print(fahrenheit)
# 13
#numeros = [1, 6, 2, 8, 3, 9]
#filtrados = list(filter(lambda x: x > 5, numeros))
#print(filtrados)
# 14
#pessoas = [("João", 25), ("Maria", 30), ("Carlos", 20)]
#ordenados = sorted(pessoas, key=lambda x: x[1])
#print(ordenados)
# 15
def multiplicador(n):
return lambda x: x * n
vezes3 = multiplicador(3)
print(vezes3(5))
To embed this project on your website, copy the following code and paste it into your website's HTML: