معرفی شرکت ها


NumRep-0.1.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A module to represent numbers by their place value.
ویژگی مقدار
سیستم عامل OS Independent
نام فایل NumRep-0.1.3
نام NumRep
نسخه کتابخانه 0.1.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Muhammed Shamil K
ایمیل نویسنده note@noteness.cf
آدرس صفحه اصلی https://github.com/necessary129/NumRep
آدرس اینترنتی https://pypi.org/project/NumRep/
مجوز 2-clause Simplified BSD
NumRep ------ .. image:: https://travis-ci.org/necessary129/NumRep.svg :target: https://travis-ci.org/necessary129/NumRep Version: 0.1.3 This module provides a way to represent the place values in a given number, eg: >>> a = NumRep(1234456789123) >>> a NumRep(Crores=123445,Lakhs=67,Thousands=89,Hundreds=1,Tens=2,Ones=3) >>> a.crores 123445 >>> a.ones 3 >>> a.hundreds 1 >>> a.tens 2 >>> a.lakhs 67 >>> print(a) 123445 Crores, 67 Lakhs, 89 Thousands, 1 Hundred, 2 Tens, 3 Ones This raises TypeError when you give it an invalid number, eg: >>> a = NumRep('notanumber1111') Traceback (most recent call last): ... TypeError: Not a valid Number. And Every integer in the NumRep has a GetRep() method, which returns the Representation of the number itself, eg: >>> a = NumRep(123456789) >>> a NumRep(Crores=12,Lakhs=34,Thousands=56,Hundreds=7,Tens=8,Ones=9) >>> a.crores 12 >>> a.crores.GetRep() NumRep(Tens=1,Ones=2) >>> a.crores.GetRep().tens.GetRep() NumRep(Ones=1) You can also do arithmetic operations on them and then use GetRep(), eg: >>> a = NumRep(123456789) >>> a NumRep(Crores=12,Lakhs=34,Thousands=56,Hundreds=7,Tens=8,Ones=9) >>> (a.crores - 2).GetRep() NumRep(Tens=1) You can compare and do arithmetic operations NumReps with integers and also with other NumReps, like: >>> c = NumRep(15) >>> c NumRep(Tens=1,Ones=5) >>> c + 10 NumRep(Tens=2,Ones=5) >>> b = NumRep(10) >>> b NumRep(Tens=1) >>> c + b NumRep(Tens=2,Ones=5) This class also provides an all() function, which gives you the real value of the given denomination, eg: >>> a = NumRep(1234456789123) >>> a.all('hundreds') 12344567891 You can also use the values specified in the module for all(), eg: >>> a = NumRep(1234456789123) >>> a.all(CRORES) 123445 ChangeLog --------- 0.1.3 * Another bug fix 0.1.2 * Fixed a major bug. 0.1.1 * define a __str__() function * Add a __main__ module 0.1 * Now can compare and do arithmetic operations on NumRep objects * Made NumRep a package 0.0.1.1 * Added variabes for all() functions in the module 0.0.1 * First Release


نحوه نصب


نصب پکیج whl NumRep-0.1.3:

    pip install NumRep-0.1.3.whl


نصب پکیج tar.gz NumRep-0.1.3:

    pip install NumRep-0.1.3.tar.gz