What Makes 100% In Life?

Learn about the Hash data type in Ruby with the help of an interesting example.

We'll cover the following...

Problem

Let's represent the alphabet numerically by identifying sequence of letters (A, B, C, ..., X, Y, Z) with the percentages (1%, 2%, 3%, ..., 24%, 25%, 26%). The sum of each character’s value in a word is the meaning-in-life percentage. For example,

H-A-R-D-W-O-R-K = (8 + 1 + 18 + 4 + 23 + 15 + 18 + 11)% = 98%

%0 node_1649310899845 Z node_1649310982025 26% node_1649310899845->node_1649310982025 node_1649310895830 ... node_1649310953540 ... node_1649310895830->node_1649310953540 node_2 C node_1649310926911 03% node_2->node_1649310926911 node_1 B node_1_1 02% node_1->node_1_1 node_0 A node_0_1 01% node_0->node_0_1
A look-up for calculating meaning-in-life percentage
...