ComeçarComece de graça

Forecasting sales with a discount

Sales are often made with special mixes and discounts. Discounts are a great marketing tool and a way to move stock. Let's look again at company T-Z.

T-Z has launched a new range of T-Shirts linked to a celebrity meme for 40 USD per T-Shirt. They have excess stock of Celebshirt1 on their shelves, and in expectation of the release of Celebshirt2 in February, they have announced a 40% discount on Celebshirt1 in February.

For this exercise, prices are in USD, and unit amounts are total units sold in the respective month. The following variables have been defined for you:

sales_price = 40

units_january = 500

units_february = 700

The January sales only include sales of Celebshirt1.

The February sales include sales of Celebshirt1 and Celebshirt2, at a ratio of 45:55.

Este exercício faz parte do curso

Financial Forecasting in Python

Ver curso

Instruções do exercício

  • Forecast the sales for January (without a discount).
  • Forecast the sales for February (discounted: dsales_price).
  • Print the results for sales for January and February.

Exercício interativo prático

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

# Forecast the sales of January
sales_january = ____ * ____

# Forecast the discounted price
dsales_price = ____ * 0.6

# Forecast the sales of February
sales_february = (____ * units_february * 0.55) + (dsales_price * ____ * ____)

# Print the forecast sales for January and February
print("The forecast sales for January and February are {} and {} USD respectively.".format(____, ____))
Editar e executar o código