Python

Haitham Mohamed
Haitham Mohamed
2,367 Points

Got the correct output in Workspaces but still not accepted (sillycase challenge)

def sillycase(itera):

length = len(itera)
len1 = 0-length
len2 = 0- (length + 1)
itera = itera.upper()
f_st = int(length / 2)-1
ron = f_st+1
ron2 = 0-ron
itera2 = []
itera2[ron2:]=itera
while f_st >= 0:
    itera2[f_st:ron] = itera[f_st].lower()
    ron -= 1
    f_st -= 1
itera2[len1:]=["".join(itera2[len2:])]
return itera2

1 Answer

Steven Parker
Steven Parker
140,501 Points

I'm not sure exactly what this does, but I can tell you that you're working way too hard!

Hint: This challenge should require only a few lines of code and no loops.