Creating And Using A Custom Module
Mon 10 August 2026
# file: calculator.py
def multiply(a, b):
return a * b
# main.py
import calculator
print(calculator.multiply(4, 5)) # Output: 20
Score: 10
Category: chapter10_modules_and_packages
# file: calculator.py
def multiply(a, b):
return a * b
# main.py
import calculator
print(calculator.multiply(4, 5)) # Output: 20
Score: 10
Category: chapter10_modules_and_packages