6.1.2. myproject#

Classes

Calculator

Creates a Calculator to make math operations

Functions

myproject.difference(a, b)[source]#

Subtracts two integers return result

myproject.summation(a, b)[source]#

Compute the arithmetic sum of two int.

Parameters
  • a (int) – integer number, if a is not int a conversion is attempted

  • b (int) – integer number, if a is not int a conversion is attempted

Returns

m

Return type

int

See also

difference

subtract two numbers

sum

Notes

The arithmetic mean is the sum of the elements along the axis divided by the number of elements. Note that for floating-point input, the mean is computed using the same precision the input has. Depending on the input data, this can cause the results to be inaccurate, especially for float32 (see example below). Specifying a higher-precision accumulator using the dtype keyword can alleviate this issue. By default, float16 results are computed using float32 intermediates for extra precision.

Examples

>>> a = summation(3,5)
>>> a
8
myproject.use_calc()[source]#

Tests the functions written in module 1 and returns a Calculator object.