Giter Club home page Giter Club logo

number-patterns's Introduction

number-patterns

Under construction! Not ready for use yet. Currently experimenting and planning. Developed by Dilith Achalan (c) 2022

Summary

This project is created to identify the number patterns on a given number sequence which will get the difference in sequence and general term or general ratio.

How to import the module

You can import numpatt module which is inside numpatterns project folder. You may use below code snippet to import convert_str_float funtion.

from numpatterns.numpatt import convert_str_float

Below functions are available to use. Funtions

  • convert_str_float
  • check_list
  • get_common_term
  • get_common_ratio
  • common_difference
  • multi_difference
  • classify_pattern

Examples of how to use

convert_str_float - funtion

This funtion take two parameters string number list, seperator and return the output as a list with floating values.

# get user input to enter a number sequence
num_list = input("Enter the number sequence: ")
nth = int(input("Enter the nth in sequence: "))

# calling the 'convert_str_float' function to get a list with string values to float
n_list = convert_str_float(num_list, sep=",")
print(n_list)

check_list - funtion

This funtion will take string number list and check if the list has at least two items to operate sequence

n_list = [2, 4, 6, 8]

# calling the 'check_list' function to validate if list has at least two items
if check_list(n_list):
    print("This list has at least two items ")

number-patterns's People

Contributors

dilith-lab avatar

Watchers

 avatar  avatar

Forkers

jharrison0114

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.