Activity

Task:

Create two separate Python modules and integrate them so that one module calls a function from the other.

  1. Create a module called math_operations.py

    • This module should have a function add_numbers(a, b) that returns the sum of two numbers.

  2. Create another module called calculator.py

    • This module should import math_operations.py and use the add_numbers() function to add two numbers entered by the user.

  3. Run calculator.py to see the result.

Last updated