mypackage Namespace

Classes

Function Reference: mypackage.Calculator

class mypackage.Calculator

CALCULATOR A simple calculator class

This class demonstrates basic arithmetic operations.

Property Summary
pi

Value of pi

version

Version of the calculator

Method Summary
add(a, b)

ADD Add two numbers

Parameters:
  • obj (Calculator) – Instance of Calculator

  • a (double) – First number

  • b (double) – Second number

Returns:

Sum of a and b

Return type:

double

multiply(~, a, b)

MULTIPLY Multiply two numbers

Parameters:
  • obj (Calculator) – Instance of Calculator

  • a (double) – First number

  • b (double) – Second number

Returns:

Product of a and

Return type:

double

Functions

Function Reference: mypackage.double_value

mypackage.double_value(x)

DOUBLE_VALUE Double a numeric value

Parameters:

x (double) – Input value

Returns:

Value multiplied by 2

Return type:

double