Add the module’s directory to sys.path
If calculator.py is in a different directory, you can manually add that directory to Python’s path:
python
import sys
sys.path.append('/path/to/directory/of/calculator')
import calculator
Replace '/path/to/directory/of/calculator' with the actual path.