0
Program to convert A to Z to numbers and add them
example if u have 'egg'= 5+7+7
8 Respuestas
+ 1
tnks so much Eligijus Silkartas..... it worked
0
Maybe this works. ord function returns ascii value of character. For example ord('a') = 97, ord('b') = 98. So I substract 96 from them and get desired numbers
https://code.sololearn.com/cDJFDGAwIKye/?ref=app
0
ok tnks
0
you are welcome 😊
0
how do I now make it to be variable that is any word i put wud bring it's sum
0
you can define a function :D i've changed the code a bit. Now it takes user input, stores it to variable and prints it's character sum
https://code.sololearn.com/cDJFDGAwIKye/?ref=app
0
Tnks dear.... Hv a lovely night
0
thanks, u too