Skip to main content

Calculator package for Turing College

Project description

Basic Calculator Package

This package was made as a project for Turing College course

After installation, import it as: from calculator.calculator import Calculator

Description:

This calculator is made as a class named Calculator.

There are 7 different Calculator class methods available.

5 of them are operations methods, 2 of them are memory methods.

Operations methods: (These methods take up to two arguments)

                .add(x,y) - Adds two numbers, x+y
                .substract(x,y) - Substracts two numbers, x-y
                .multiply(x,y) - Multiplies two numbers, x*y
                .divide(x,y) - Divides two numbers, x/y. Y cannot be assigned a value of zero.
                .nr(y,x) - Returns y-th root of x, example: .nr(2,4) 2nd root of 4 = 2 (square root in          this case)

Memory methods: (Memory methods dont take any arguments) .show_memory() - shows current memory value .clear_memory() - resets memory to value of 0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

final_calculator_martin_macak-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page