[Solved] Getting the number value of characters in a word and to do arithmetic operations with the number for encoding [closed]
The most analagous way to do it the way you describe it would be to use two variables left (l) and right (r) that will iterate the string and get their base values using ord(char) – ord(‘a’) + 1: my_string = “World” my_string = my_string.lower() l = 0 r = len(my_string)-1 total = 0 while … Read more