Skip to content

Instantly share code, notes, and snippets.

@w00fx
Created March 16, 2022 14:26
Show Gist options
  • Select an option

  • Save w00fx/46c7cae44128d77d0f4bff078de586ca to your computer and use it in GitHub Desktop.

Select an option

Save w00fx/46c7cae44128d77d0f4bff078de586ca to your computer and use it in GitHub Desktop.
Exercicio
SALARIO_GERENTE = 2000
SALARIO_VENDEDOR = 1000
def informe_vendas(vendedores):
valor_vendas = 0
for vendedor in vendedores.keys():
valor_vendas += int(input(f'Favor inserir o valor de vendas de {vendedor}: '))
vendedores[vendedor] = valor_vendas
print('\n')
return vendedores, valor_vendas
vendedores = {
'Emily': 0,
'Larissa': 0,
'Rafael': 0,
'Milena': 0
}
vendedores, total_vendas = informe_vendas(vendedores)
print(f'Faturamento da empresa: R${total_vendas}\n')
for vendedor, faturamento in vendedores.items():
if faturamento < 5000:
salario_final = SALARIO_VENDEDOR + (faturamento*0.01)
print(f'Salario final do vendedor {vendedor} sera de R${salario_final}')
elif faturamento > 5000 and faturamento < 10000:
salario_final = SALARIO_VENDEDOR + (faturamento*0.015)
print(f'Salario final do vendedor {vendedor} sera de R${salario_final}')
else:
salario_final = SALARIO_VENDEDOR + (faturamento*0.02)
print(f'Salario final do vendedor {vendedor} sera de R${salario_final}')
salario_final_gerente = SALARIO_GERENTE + (faturamento * 0.05)
print(f'Salario do gerente sera de {salario_final_gerente}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment