+ 3
Challenge-- find sum of string value
If a=1, b=2 so on z=26 then take input from user and find sum of string characters ex: input=abcd a+b+c+d=1+2+3+4 output=10
4 Respuestas
+ 15
there might be some correction in example ☺
+ 10
Shortest code till now -
sum=0
for i in input() :
if(ord(i.upper()) >=65 and ord(i.upper())<=90):
sum+= (ord(i.upper())-64)
print(sum)
https://code.sololearn.com/cFgFkeDdXZfv/?ref=app
+ 3
https://code.sololearn.com/cwBOGZ39cos9/?ref=app
+ 2