Get startedGet started for free

Tax calculations

It's possible to use vectorized operations to calculate taxes for the liquor, restaurant, and department store industries! We'll simplify the tax calculation process here and assume that government collects 5% of all sales across these industries as tax revenue.

Your task is to calculate the tax owed by each industry related to each month's sales. numpy is loaded for you as np, and the monthly_sales array is available.

This exercise is part of the course

Introduction to NumPy

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create an array of tax collected by industry and month
tax_collected = ____
print(tax_collected)
Edit and Run Code