Activity
Task:
Create two separate Python modules and integrate them so that one module calls a function from the other.
Create a module called
math_operations.py
This module should have a function
add_numbers(a, b)
that returns the sum of two numbers.
Create another module called
calculator.py
This module should import
math_operations.py
and use theadd_numbers()
function to add two numbers entered by the user.
Run
calculator.py
to see the result.
Last updated