Coverage for src/km3dq_common/calc.py: 100%
9 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-25 11:58 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-25 11:58 +0000
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
5class Calculator:
6 def add(self, a, b):
7 return a + b
9 def divide(self, a, b):
10 if b == 0:
11 raise ValueError("Undefined division for b=0")
12 return a / b
14 def multiply(self, a, b):
15 return a * b