You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
473 B
Python
18 lines
473 B
Python
2 years ago
|
def sponge(stringington):
|
||
|
lengthofhim = len(stringington)
|
||
|
indexo = 0
|
||
|
listino = []
|
||
|
while indexo < lengthofhim:
|
||
|
if indexo % 2 == 0:
|
||
|
newboy = (stringington[indexo].lower())
|
||
|
else:
|
||
|
newboy = (stringington[indexo].upper())
|
||
|
listino.append(newboy)
|
||
|
indexo += 1
|
||
|
theoutput = "".join(listino)
|
||
|
return theoutput
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
x = input("Type something here.\n")
|
||
|
print("\n" + sponge(x))
|