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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for final_calculator_martin_macak-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a9b321c85d97523e75d3b3881bdbbec1093ede3444c8bf2f8d29b909b61bfd |
|
MD5 | bccdb48be7851ca899ad031411872435 |
|
BLAKE2b-256 | 3fa0e8dbdff1af9c9ed79f6a695cc771259e44317d7f788b8fa5c1e4d4a8bcd8 |
Close
Hashes for final_calculator_martin_macak-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0f59ee6bb7057a460fc90dc23a0491d457e51971f2e564cff3c65dbc75b1b1 |
|
MD5 | 921685def3293ca1ed3adde643d2d60a |
|
BLAKE2b-256 | f8e647e0ce417ea4438ce13691af6643d3f4d97d432f47198b598acc1278a0be |