Member-only story
This document provides an overview for the script “Scrollette.py”. Scrollette is a Python script which generates a random Bible verse everytime you run the script, there is also provision for sending the bible verse to an email address.
The name ‘Scrollette’ is gotten from ‘Scroll’ and ‘Roulette’
Script available in my GitHub.
The script has been developed in three (3) phases
Phase 1: Generate a random bible verse using the Book, number of chapters per book, number of verses per chapter.
To achieve this, I created text files for and read the contents into a python dict.
- Book : Number of chapters (One (1) text file)
- Chapter : Number of verses (66 text files i.e one(1) text file per book)
Once the contents had been loaded in the python dict, I used python lists and random module to facilitate the randomisation.
Phase 1 : Pseudocode
Import random module
Store a list of Bible books and the number of chapters per book in a text file. (Format — Book : number of chapters)