FizzBuzz For Corporate Practices
Project description
FizzBuzz Co.
This is a module that helps perform the FizzBuzz excercise with minimal effort. In addition, it also gives an ability for one party to test the output of another.
I wanted to learn how publishing of python modules for wider distribution can be performed. Therefore, I chose to do an experiment of that with one of the most famous examples of excercises given in companies, when testing a new programmer. And since Python essentially has a package for everthing - why not make it for FizzBuzz. Hence, FizzBuzz Co. (FizzBuzz + Companies).
Installation
Run (approximatelly, depending on the current release version and your version of pip/pip3) the following to install:
pip install fizzbuzz-co
Usage
from FizzBuzz import FizzBuzz
Print FizzBuzz values from 5 to 20:
# Input:
fizzbuzz=FizzBuzz()
fizzbuzz.fizzbuzz(amount=15, start=5)
# Output
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Perform a check if a list of information fits the FizzBuzz criteria
# Input (Positive outcome)
fizzbuzz=FizzBuzz()
sequence=[1, 2, "Fizz", 4, "Buzz"]
answer = fizzbuzz.compliance(sequence=sequence, start=1)
print(answer)
# Output:
The candidate has passed.
# Input (Negative outcome)
fizzbuzz=FizzBuzz()
sequence=[1, "Fizz", 4, "Buzz"]
answer=fizzbuzz.compliance(sequence=sequence, start=1)
print(answer)
# Output:
The candidate has not passed.
Report generation for the candidates performance
# Input
fizzbuzz=FizzBuzz()
sequence=[1, "Banana", "Fizz", 4, "Buzz"]
fizzbuzz.compliance_report(sequence=sequence, start=1)
# Output in a generated file: FizzBuzz_Report_YYYYMMDD_HHMM (year-month-day_hour_minute)
| Real Answer | Candidate's Answer | Status |
|---|---|---|
| 1 | 1 | :heavy_check_mark: |
| 2 | Banana | :x: |
| Fizz | Fizz | :heavy_check_mark: |
| 4 | 4 | :heavy_check_mark: |
| Buzz | Buzz | :heavy_check_mark: |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fizzbuzz_co-0.0.5.tar.gz.
File metadata
- Download URL: fizzbuzz_co-0.0.5.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0bfda773f950c9044fa495ac12343cf7ec09389c1e42f54fa69f94eb62ee95e
|
|
| MD5 |
8cc2ff9fb3f2d6d4b44abeab0854e4ff
|
|
| BLAKE2b-256 |
e2fdb664a0c792195026bdf64c75b7342ef8d0e70b9aa4a620f9ce022f110659
|
File details
Details for the file fizzbuzz_co-0.0.5-py3-none-any.whl.
File metadata
- Download URL: fizzbuzz_co-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a078681b8c252cd3779b060434483925ab69878b58af8fa2273fb954aa282f97
|
|
| MD5 |
c6f7c2b22ebdf0ba0dfc9e70fdda94cd
|
|
| BLAKE2b-256 |
d96cd070fb06ccd0610de5b32921da37a4be7f03bbbc2b869045afa6fe67df24
|