pager code:
input 1:
abde
output:
12(i.e 1+2+4+5)
input 2:
XYZ:
outpu:75
string_line = input("Enter a string line: ")
lower_line = string_line.lower()
ASCII_line = []
count = 0
for character in lower_line:
ASCII_line.append(ord(character))
for i in range(len(ASCII_line)):
count += ASCII_line[i] % 96
print(count)
Comments
Leave a comment