FizzBuzz
Explore the repository»
View Problem Statement
View Report
tags : fizzbuzz, python, deep learning, tensorflow
This project is an implementation of the simple task of FizzBuzz. In this task, an integer divisible by 3 is printed as Fizz, and integer divisible by 5 is printed as Buzz. An integer divisible by both 3 and 5 is printed as FizzBuzz. The following methods were implemented and the performance was evaluated.
- if-then-else logic
- Deep model classifier
This project was built with
- python v3.7
- tensorflow v2.1
- The list of libraries used for developing this project is available at requirements.txt.
Clone the repository into a local machine using
git clone https://github.com/vineeths96/FizzBuzz
Please install required libraries by running the following command (preferably within a virtual environment).
pip install -r requirements.txt
The training dataset for the deep model is generated on-the-fly. No prior setup is neccesary.
The main.py
is the interface to the program. It is programmed to run in two modes – train mode and test mode. The main.py
file takes one optional command line argument, to specify the mode of execution – whether to train or test model. The main.py
, when executed without any arguments enters into training the deep model. The main.py
, when executed with –test-data <test_file>
argument (where test_file
is the path to the test file), enters into testing the deep model, and produces the output files Software1.0.txt
and Software2.0.txt
respectively.
python main.py
python main.py -–test-data <test_file>
Detailed discussions on results can be found in the report here.
Model | Accuracy |
---|---|
if-then-else logic | 100% |
Deep network model | 98% |
Distributed under the MIT License. See LICENSE
for more information.
Vineeth S - vs96codes@gmail.com
Project Link: https://github.com/vineeths96/FizzBuzz