+ 37

[ ASSIGNMENT: ] Word Values

Given a String "abc" and assuming that each letter in the String has a value equal to its position in the alphabet ("abc" has a value of 6) This means that a=1, b=2, c=3 ... z=26 TASK : Given a list of strings. Return the values of the strings multiplied by the position of that String in the list. Position begins with 1 Example :: nameValue ["abc", "abc abc"] return [6, 24]  because of [ 6*1, 12*2 ]. Spaces are ignored! NOTE : Input will only contain lowercase characters and spaces! HappyCodings!:-)

9th May 2018, 7:13 PM
Danijel Ivanović
Danijel Ivanović - avatar
23 ответов
9th May 2018, 10:38 PM
LukArToDo
LukArToDo - avatar
11th May 2018, 5:46 PM
🌛DT🌜
🌛DT🌜 - avatar
10th May 2018, 8:51 AM
Uni
Uni - avatar
+ 17
Hello, 🤗 Flash do you want my answers (are they so interesting! 😆) or you want to solve the tasks and show the way and solution from which something new can be learned👍 No, you will not find my solution 😄🤘 I'm glad you're participating and writing java one-liners 👍😉🍻
6th Jul 2018, 7:12 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 15
Morpheus 💪Indeed my friend! 😄😀👏👏
14th May 2018, 7:32 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 15
Flash why to hide them when you are so interested, 😁😉👌 I am really honored, 👏🍻 thank you very much for your interest! 👍😊
6th Jul 2018, 7:42 PM
Danijel Ivanović
Danijel Ivanović - avatar
9th May 2018, 8:06 PM
Zoetic_Zeel
Zoetic_Zeel - avatar
+ 11
https://code.sololearn.com/c86oWngLwDMa/?ref=app
10th May 2018, 7:34 AM
Paul
Paul - avatar
9th Jul 2018, 12:48 AM
Martin Möhle
Martin Möhle - avatar
+ 10
v=lambda l:sum(n*(sum(map(ord,s))-96*len(s)) for n,s in enumerate(" "+l))
10th May 2018, 1:01 PM
VcC
VcC - avatar