ComeçarComece de graça

Assigning dependencies for expenses

Txs Tools wants to assign a dependency for its operating expenses, particularly admin salaries.

The conditions are as follows:

  • Admin expenses increase in July and August (Jul and Aug) as temporary workers need to be hired to cover the summer holiday.
  • The increase is based on the number of employees taking holidays during that time. For the current year, the value for August is emp_leave = 6 (6 employees expected to take leave).
  • The cost is 80 USD per temp employee hired.

Este exercício faz parte do curso

Financial Forecasting in Python

Ver curso

Instruções do exercício

  • Using an if statement, calculate the dependency for the admin expenses admin_dep for August only by using a calculation that multiplies the employees expected to take leave (using the variable emp_leave) by the USD rate per employee.
  • Print the resultant variable you have calculated.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Set the admin dependency
if emp_leave > 0:
    admin_dep = ____ * ____

# Print the results
print("The admin dependency for August is {} USD.".format(____))
Editar e executar o código