can someone explain to me like i am five what is happening here. i’d like to understand the basic of how the shift variable is working here in accordance with the output. I dont want to progress without understanding the logic of these simple steps. thank you in advance to anyone kind enough to tap in for your time and patience
Welcome back to the forum @imanwashere
findis again returning-1for uppercase letters, and for the space character, too. You are going to take care of the space later on.
For now, instead of iterating over
text, change theforloop to iterate overtext.lower().
Here is the orginal for loop.
This is the output.

A result of -1 means a match was not found.
Adding the .lower() method to the text variable converts all the letters to lower case.
For this step, the shift variable is not used.
Happy coding
The shift variable will be used at a later point. For now, it has been declared but isn’t actually serving any useful purpose. This will all be explained as you progress through the following steps.
thank you so much for this, it helps a lot
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
