Answer to Question #328734 in Python for chinna

Question #328734

pager code:

input 1:

abde

output:

12(i.e 1+2+4+5)

input 2:

XYZ:

outpu:75


1
Expert's answer
2022-04-14T11:24:07-0400
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS