# Function to calculate Gematria value for a Hebrew word
def calculateGematria(word):
gematriaValues = {
'א': 1, 'ב': 2, 'ג': 3, 'ד': 4, 'ה': 5, 'ו': 6, 'ז': 7, 'ח': 8,
'ט': 9, 'י': 10, 'כ': 20, 'ך': 20, 'ל': 30, 'מ': 40, 'ם': 40,
'נ': 50, 'ן': 50, 'ס': 60, 'ע': 70, 'פ': 80, 'ף': 80, 'צ': 90,
'ץ': 90, 'ק': 100, 'ר': 200, 'ש': 300, 'ת': 400
}
word = word[::-1] # Reverse the word for right-to-left calculation
gematriaValue = sum(gematriaValues.get(letter, 0) for letter in word)
return gematriaValue
# Example usage
hebrewWord = "שלום"
gematriaResult = calculateGematria(hebrewWord)
print(f"The Gematria value for '{hebrewWord}' is {gematriaResult}")