Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialseong lee
4,503 Pointscan someone tell me what i am doing wrong. Thank you in advance
I do not understand what I am doing wrong can someone please tell me
def sillycase(argu):
uther = int(argu[0:2]).lower
arthur = int(argu[2:]).upper
ret = (uther, arthur)
return ret
1 Answer
Kevin Brennan
19,920 Pointsdef sillycase(astring):
half = len(astring)//2
return astring[:half].lower() + astring[half:].upper()
Hi Seong,
The challenge asked for the first half a string to be returned in lowercase and the second half in uppercase. To do this you need to use the len() function and divide the answer by two using integer division. You then just use that figure in your slices. Hope that helps.
seong lee
4,503 Pointsseong lee
4,503 PointsWow, I was way off from what I needed to do. Thank you. I will always remember this at all times.