repl.it
@argthe1st/

Weird Strings

Python

Why not?

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
def weirdStrings(text, numb):
    output = ''
    for letter in range(len(text)):
        if letter%2 == numb:
            output += text[letter].lower()
        else:
            output += text[letter].upper()
    return output

?