Coverage for src/km3dq_grl/calc.py: 100%
9 statements
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-18 16:16 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2024-04-18 16:16 +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