THINKING & TESTING: HOW MANY "WORD"?

Subscribers:
4,890
Published on ● Video Link: https://www.youtube.com/watch?v=R3LKUO0825c



Duration: 3:05
38 views
1


EXPLANATION CODE:
1) This is a Python function that takes a string s as an argument and returns the number of times the letters in the string alternate between uppercase and lowercase.

2)Here's how the function works:
It initializes a string key with the value 'word'.
It initializes a variable letter_i with the value 0.
It loops through each character c in the string s.
If the lowercase version of the current character matches the character in key at index letter_i % len(key), the function increments letter_i.
The function returns the integer division of letter_i by the length of key.

Contents:
0:00 - Reading
1:10 - Solving
2:25 - Explaining

#codewars #code #wars #javascript #game #how #many #word #thinking #testing #pythonprogramming #programming #python #education #tutorial #computerscience #games #puzzles







Tags:
codewars
code
wars
tutorial
step by step
education
computer science
explanation
7kyu
algorithms
games
puzzles
thinking
testing
how
many
word
python
python programming