This library is a very basic library which is used to perform simple calculations.
For example - 4 + 9 or 92 - 8, etc.
It is the package used for educational purpose only
It has a class which includes the following things:
class BasicMaths methods add(a, b), subtract(a, b), multiply(a, b), divide(a, b), remainder(a, b)
To use this module the following code is required:
import myCalc9 as Calc
calculate = Calc.BasicMaths(10, 6)
addition = calculate.add()
print(addition)
The output would be:
16
Did you see how easily we've calculated the sum of the given two numbers.
You can also do this. You just have to understand working of the functions and classes. If you want to calculate the difference of two numbers just replace the add() function with subtract() function and so for other also.
Python is a very beautiful, easy and powerful language that anyone could understand. Mastering in Python is much easier than other languages.
I hope you've gained some knowledge from this module. Since this is my first library so in the future i'll try to make amazing libraries which could be useful for everyone. Till the time stay tuned, stay healthy and never stop coding.
- Python version should be 3.0+.
- pip should be updated to the latest version. To upgrade pip use
pip install --upgrade pip
.
- Class used
BasicMaths
. - Functions are:
- add()
- subtract()
- multiply()
- divide()
- remainder()
- There are only two parameters in each function. For example - add(a, b). a and b are two parameters.
To install this library in your PC you just have to follow the instructions given below:
- First open your
command prompt
for Windows 10 users open yourPowerShell
. - It must that Python is installed in your PC and Path variable in the environment.
- To install it write
pip install myCalc9
in your command prompt. It takes few seconds in the installation process.
Bravo, we've installed this library in our PC.
Now, just go and play with it in your Python IDE
.
It is especially made for beginners. If you're are beginner
then don't forget to download this library.