Simulates the growth of followers for an arbitrary social network. The program uses command-line arguments to accept the initial number of followers and a range for generating random values to simulate follower growth.
To run the program from command line:
python simulate_follower_growth.py [-h] [-c cycles] initial_followers random_range_start random_range_end$ python simulate_follower_growth.py -c 25 100 0 10
Starting with 100 followers.
It's a holiday! Extra followers! ππ -> 31
You post a viral post! π -> 220
You got mentioned by a celebrity! π -> 146
You took a social media break. π΄ -> -17
New: 5, By events: 380, Total: 626
-------- Simulation Summary --------
Simulation cycles........: 25
Initial followers........: 100
Total new followers......: 526
Total event followers....: 380
Percentage by events.....: 72.24%
Final number of followers: 626To run the tests from command line:
python -m unittest test_simulate_follower_growth.py