Hi, I need someone’s help to walk me through the Solution for Python 3: String Method: Coded_communications project: Step 6. Screenshot of the Codecademy solution below …
The first line of code defines the function that has been created to take in two arguments. The coded_message which is the jargon of mixed up letters that we’ve been provided with, and the keyword “friends” which we are to apply to the string of mixed up letters. Ok I get that.
The second line of code is kind of like that “counter = 0” which we’ve been seeing a lot of in previous lessons. This letter_pointer (aka counter) helps us keep track of the number of … loops? … that we’re going to cycle through. The total number of loops is determined by fourth line of code and the lowercase letter i helps us to find the placement (which letter we’re currently at) in the string of mixed up letters.
My first question is, what is the third line of code for? Why do we need to know the final keyword. I thought we were given the keyword. It’s “friends.” ??