Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

gematria python

def gematria(word):
    alphabet = {"a":1, "b":2, "c":3, "d":4, "e":5, "f":6, "g":7, "h":8, "i":9, "j":10, "k":11, "l":12, "m":13, 
    "n":14, "o":15, "p":16, "q":17, "r":18, "s":19, "t":20, "u":21, "v":22, "w":23, "x":24, "y":25, "z":26, " ":0}
    word_gematria = 0
    for i in range(len(word)):
        word_gematria += alphabet[word[i]]
    return word_gematria 
print(gematria("abc")) >>> #will print 6 
Comment

PREVIOUS NEXT
Code Example
Python :: numpy.ndarray to lsit 
Python :: query with condition django 
Python :: python list all methods of a class 
Python :: Python t date from a timestamp 
Python :: simple graph in matplotlib categorical variables 
Python :: convert list to dataframe 
Python :: python how to remove item from list 
Python :: find percentage of missing values in a column in python 
Python :: git help 
Python :: python django model range validation 
Python :: python function get number of arguments 
Python :: Python capitalize first letter of string without changing the rest 
Python :: python how to count items in array 
Python :: poetry python download windows 
Python :: list from comma separated string python 
Python :: python sort array of dictionary by value 
Python :: how to run a python script 
Python :: if else one line python 
Python :: dataframe select data type 
Python :: convert timestamp to date python 
Python :: Play Audio File In Background Python 
Python :: plot pil image colab 
Python :: np.zeros((3,3)) 
Python :: python print with 2 decimals 
Python :: delete a column in pandas 
Python :: python check if list contains 
Python :: findout not common values between two data frames 
Python :: python optional parameters 
Python :: python check if there is internet connection 
Python :: how to remove none in python 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =