Daily Challenge #95

Hello everyone,
So today i came up with another challenge :wink:

Get word’s letters total

Task

Create a procedure that you provide it a word and it will return the sum of all of its letters according to the numbers corresponding to the letters:
Example table ( that will help you debugging ):
image

Example

Hope those examples explain what i’m talking about.

String => 87
Daily challenge => 118
[email protected] => 0

Notes:

1- This procedure can calculate the total of a two words or more.( see example 2 )
2- If there is some undefined words they will be calculated as 0 ( see example 3 )
3- Spaces are ignored.
4- You can’t use any extensions or components.
5- The fastest , shortest, but functional answer will be marked as solution 2020-08-26T23:00:00Z

Regards,
Mohamed Tamer

3 Likes

How could I missed it! Will do it now :grin:

It is interesting : D

1 Like

Thanks @WatermelonIce :grin:

Here is my solution

My Blocks

4 Likes

Great job! @dora_paz :ok_hand:

1 Like

Done with 20 blocks!

My soluion
4 Likes

Great solution @WatermelonIce. :ok_hand: :+1:

Actually, after seeing @dora_paz’s solution, I reduced blocks combining mine and her logic!

Optimized

But this doesn’t count as my solution :slight_smile:

3 Likes

@WatermelonIce Great !! :+1:

2 Likes

Great work :+1:

2 Likes

I think looking at the code you have the least amount of blocks :+1:

But thanks to @dora_paz for the idea. :wink:

3 Likes

@WatermelonIce

Take it -

:+1:

1 Like

After like 10 daily challenge I improved a lot! I treat them as a practice, because the aim is to kode with the least amount of blocks. This forces myself to optimize my block more and more :kodular:

3 Likes

Once Again

Take it -
:+1:

1 Like

@Mohamed_Tamer You shouldn’t mark that as solution because it’s not completely belongs to me :sweat_smile:

And

I believe you deserve it ! :+1: :clap:

You are right
I thought no one will get a shorter solution.Any way, i will wait until 2020-08-26T23:00:00Z maybe someone gets something shorter.

1 Like

Btw, if you want to create more daily challenges, post it here to reserve!

But it is off-topic so I would like any mods to change it to discuss. Thanks!
@Peter (Sorry but I need you attention :sweat_smile:)

1 Like

Yes i tried but its read only now.

Changed it to discuss.

4 Likes