Skip to main content

package development exercise

Project description

selee Package

selee is a python package that contains the function fizz_buzz() in selee_module.

The fizz_buzz() function accepts a single argument, x and returns the output as string or the same type of the input x, using the below logic:

  • Multiples of 3 returns “Fizz” instead of the number
  • Multiples of 5 return “Buzz”.
  • For integers which are multiples of both 3 and 5 return “FizzBuzz”
  • Any other cases return the input

Quick Start

This is a short introduction and quickstart for the selee package.

fizz_buzz application starts by installing selee package

from selee import selee_module

Users can check the result of the fizz_buzz function by putting the input x inside the parentheses.

selee_module.fizzbuzz(x)

Examples

from selee import selee_module

selee_module.fizzbuzz(2)
 >> 2
selee_module.fizzbuzz(3)
 >> Fizz
selee_module.fizzbuzz(5)
 >> Buzz
 selee_module.fizzbuzz(15)
 >> FizzBuzz

Test

Seven test cases are included in the unit_test.py. Below is the code for running those test cases.

python -m unittest tests/unit_test.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

selee-0.2-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page