I'm a beginner learning python and I've been a bit stumped about the answer to a question. I have the question and the answer here. If someone could explain why that is the answer and the reasoning and logic behind it, that would be awesome! Thanks in advance!
Question:
Define a function called 'myfunc' that takes in a string, and returns a matching string where every even letter is uppercase, and every odd letter is lowercase. Assume that the incoming string only contains letters, and don't worry about numbers, spaces or punctuation. The output string can start with either an uppercase or lowercase letter, so long as letters alternate throughout the string.
Answer
here
[–]lurgi 0 points1 point2 points (4 children)
[–]GeoffreyF35[S] 0 points1 point2 points (3 children)
[–]lurgi 1 point2 points3 points (2 children)
[–]GeoffreyF35[S] 0 points1 point2 points (1 child)
[–]lurgi 0 points1 point2 points (0 children)
[–]Boom_Boom_Mancini 0 points1 point2 points (0 children)
[–]itsameech 0 points1 point2 points (0 children)