Coded correspondence excercise, % operator? (SPOILER)

Hi guys,

I hope you remember this off platform project, Coded Correspondence, I dont understand why we have to use the % 26 in the excercise:

could you pls share your thoughts? i really want to understand this one!!

thanks a lot!

Let’s say letter_value was already 24, and you add 10 to it.

What would the line translated_message += alphabet[(letter_value + 10)] do without the % 26 part, in this case, if letter_value is 24?

2 Likes

Hi, thanks for the reply!

Got it, after thinking about it for a while… thanks a lot!!

Sad since i would have never solved this project myself =( but well

I will keep working!!
best,

1 Like