Skip to main content

package development exercise

Project description

selee_pk Package

selee_pk 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

Installation

Python>=3.6 is needed. pip install selee_pk

Quick Start

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

fizz_buzz application starts by installing selee package

from selee_pk 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_pk 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


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

selee_pk-0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

selee_pk-0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file selee_pk-0.1.tar.gz.

File metadata

  • Download URL: selee_pk-0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for selee_pk-0.1.tar.gz
Algorithm Hash digest
SHA256 de5adbd94d2a333c52dbff4c065dd72d8366863f75386cec97f2c01f147ff354
MD5 d2e113c353b9a14caf10ed50b837f2fc
BLAKE2b-256 1c70b6afd96a3bed470fc06940d93d9efaef66d92342bee63469a3fe91cad04a

See more details on using hashes here.

File details

Details for the file selee_pk-0.1-py3-none-any.whl.

File metadata

  • Download URL: selee_pk-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.3

File hashes

Hashes for selee_pk-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89b317f366b970fbbc4e778a53c7d2da6b045bfbde9bef4c99b5709815a2809a
MD5 7707e50cf710fe53ae5ccb5eea93fee8
BLAKE2b-256 c40bc7ebd100f31f0ac4e88f38c528063e966586552ad672883190cecda5e918

See more details on using hashes here.

Supported by

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