ComeçarComece de graça

Calculating gross profit

Gross profit is the amount of money you generated in sales minus the cost of selling those goods (Also know as Cost of Goods Sold or COGS). COGS does not include administration or marketing costs, only costs directly related to production or providing the good or service, so Gross Profit is a good metric to see the core profitability of any product\service.

\(Gross\,Profit = {Total\,SalesValue}-{Total\,COGS}\)

Gross profit margin is the gross profit expressed as a percentage of sales, which is valuable for analysis and decision making.

\(Gross\,Profit\,Margin = \frac{Gross\,Profit}{SalesValue}\)

As the manager of a factory, you have been asked to check the gross profit forecast for the following year.

Este exercício faz parte do curso

Financial Forecasting in Python

Ver curso

Exercício interativo prático

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

# Set the sales variable to 8000
sales = ____

# Set the cost of goods sold (cogs) variable to 5400
cogs = ____

# Calculate the gross profit (gross_profit)
____ = ____ - ____

# Print the gross profit
print("The gross profit is {}.".format(____))
Editar e executar o código