Member-only story

Scrollette.py Documentation

Adetomiwa
4 min readJan 22, 2022

--

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.

Fig 1: Code snippet

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.

Fig 2: Phase 1 code snippet

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)

--

--

Adetomiwa
Adetomiwa

Written by Adetomiwa

The adventures of the solitary talkative

No responses yet