This project includes a Python program that implements a simple FizzBuzz algorithm with customized output, along with a shell script to run the Python program with optional arguments.
The program prints numbers from 1 to a given number n
(defaults
to 15 if no argument is provided). However, for numbers divisible by:
main.py
: The Python program that contains the FizzBuzz implementation.
run.sh
: The shell script that checks if an argument is passed. If an argument is
provided, it runs the Python script with that argument; if not, it runs the
Python script with the default value 15
.
You can run the Python program directly by executing:
python3 main.py [n]
from directory the file lives in or …
./problems/fizzbuzz/python/bartzcarter/run.sh [n]
You can run the Test program directly by executing:
python -m unittest test.py
from the directory the file lives in or …
./run_tests.sh