Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

math-randomseed

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

math-randomseed

A Python package providing basic math operations and a sprinkle of humor with random math facts and jokes.

  • 0.2.3
  • PyPI
  • Socket score

Maintainers
1

Python CI

Python Package Exercise

The Math RandomSeed Python package is a lightweight library designed to bring a bit of fun to math operations. With simple addition, subtraction, multiplication, division functions, and quirky mathematical facts and jokes, the package is both entertaining and auxiliary. The project follows conventional software engineering practices with testing, proper packaging, and clear instructions for easy distribution. Documentation for all functions and instructions for installing are detailed below.

Group Members

Lara Kim
Andrew Huang
Ahmed Omar
Henry Wang

https://pypi.org/project/math-randomseed/0.2.3/

Package Functions

  1. add(x, y):
    Adds two numbers together.
  2. subtract(x, y):
    Subtracts the second number from the first.
  3. multiply(x, y):
    Multiplies two numbers.
  4. divide(x, y):
    Divides the first number by the second. Raises a ValueError for division by zero.
  5. get_math_fact():
    Returns a random fun math fact as a string.
  6. tell_math_joke():
    Returns a math-themed joke as a string.

See example.py for, well, an example.

Setting up Virtual Env, Installing Dependencies, and Building and Testing

  1. Install pipenv
pip install pipenv 
  1. Install all dependencies from Pipfile.lock
pipenv --python $(which python3) install

Or if you are using powershell:

pipenv --python $(where.exe python3) install
  1. Activate the virtual environment
pipenv shell 
  1. Install the package
pipenv install -e . 
  1. Run tests
pip install -U pytest

pytest

If the pytest shows ImportError, try to install python 3.8 and start from beginning

  1. Run an example program
python3 example.py

or

python example.py
  1. Tell a math joke, from the command line
tell_math_joke
  1. Get a math fact, from the command line
get_math_fact

Installation and Usage

To install the most recent version of 'math-randomseed' as a PyPI package, simply run the following command in your terminal:

pip install math-randomseed --upgrade 

or

pip3 install math-randomseed --upgrade

To use 'math-randomseed' in your project, import the desired functions as follows:

from math_randomseed import add, subtract, multiply, divide, get_math_fact, tell_math_joke

Command Line Capability

  1. Type tell_math_joke into the command line to tell a math joke.
  2. Type get_math_fact into the command line to give a math fact.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc