Skip to content

Redysz/Python-Class-For-Five-Manipulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

It is very useful tool for differents manipulating on five.

How to use this library

To use this library just import it in that way:

from five import Five

Next you need create an instance of class Five:

my_five = Five()

What the library could do

  1. Library helps avoid magic 5 number for calculations:
my_five + 3  #8
my_five ** 2  #25
2 ** my_five  #32
my_five << 3  #40
if my_five < 6:
        print('It works!')  # 'It works will be displayed'
  1. Library can be useful for translating five in many languages:
print(my_five.say_five_in_language('Russian'))  # пять
print(my_five.say_five_in_language('Polish'))  # pięć
  1. You can also check for five in different digits:
my_five.print_five_in_digit_type('European')  # 5
my_five.print_five_in_digit_type('Arabic')  # ٥
my_five.print_five_in_digit_type('Arabic-west')  # ۵
  1. You can also check for properties of five:
my_five.is_complex()  # False
my_five.is_rational()  # True
  1. Or even represent 5 by any sort of operation:
my_five.as_sum()  # 3+2
my_five.as_fraction()  # 10/2
  1. Function draw_five can draw five:
____
|
|--\
   |
---/
  1. It also can repeat everyting 5 times!
my_five.say_five_times('😹')  # it will print: 😹😹😹😹😹
my_five.say_five_times('vodka')  # it will print: vodkavodkavodkavodkavodka

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages