PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
inp = input("Please enter some text that I will calculate.\r\n")
res = 0
for i in inp:
if i.isupper():
res += ord(i) - ord('A') + 1
elif i.islower():
res += ord(i) - ord('a') + 1
else:
print ("Your given string contains non Alphabetic characters. I can't calculate")
break
print ("Calculation is : " + str(res))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run