valores = input('Digite os valores das vendas: ')
lista_valores = valores.split(' ')
print(lista_valores, type(lista_valores),'\n')
def converter_valor(lista_valores):
converter = list(map(lambda x : int(x), lista_valores))
verificar_conversao = map(lambda x: type(x) == int, converter)
if all(verificar_conversao) == True:
return converter
else:
print(f'Conversão falhou: {lista_valores}')
def somar_valores(valores_convertidos):
return sum(valores_convertidos)
valores_convertidos = converter_valor(lista_valores)
venda_total = somar_valores(valores_convertidos)
print(f'O total de vendas foi: {venda_total}')