1. Learn
  2. /
  3. Projects
  4. /
  5. Case Study: Building Software in Python

Connected

Exercise

BasicCalculator

Let's start building! As you know that the calculator will be popular, you want to make the code as efficient as you can.

You recall that the NumPy package is a powerful numerical computing library for Python. It even serves as the foundation for many other scientific computing and data analysis libraries.

You decide to use the NumPy package to create your basic calculator. Now, you need to refresh your memory of how NumPy works. numpy has been imported for you as np.

Instructions 1/2

undefined XP
  • 1
    • Import the numpy package under the np alias and use the help() method to view the documentation for the .add() method.
  • 2
    • Use the .multiply() and .divide() functions from numpy in BasicCalculator.
    • Divide 6 percent (as a decimal) by 12.