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 trialIdris Abdulwahab
Courses Plus Student 2,961 Pointsslices
Quiz Challenge: Create a function named sillycase and it'll take a single string as an argument. sillycase should return the same string but the first half should be lowercased and the second half should be uppercased. For example, with the string "Treehouse", sillycase would return "treeHOUSE". Don't worry about rounding your halves, but remember that indexes should be integers. You'll want to use the int() function or integer division, //.
def sillycase(cola):
start = cola[:int(len(cola)/2)]
end = cola[int(len(cola)/2):]
small = start.lower()
big = end.upper()
final = small + big
return final
2 Answers
Christopher Gomez
Courses Plus Student 13,800 Pointshere try this
[Moderator redacted]
Christopher Gomez
Courses Plus Student 13,800 Points@Idris Abdulwahab glade to help that's what the community is for
Michael Hulet
47,913 PointsMichael Hulet
47,913 PointsHey Christopher!
For future reference, it's frowned upon in the Community to post code that can be copied and pasted and just work without explanation. As such, I've redacted the code in this answer. If you'd like to re-post your code, feel free to do so, but make sure it illustrates how to solve the problem without actually being copy/pastable to solve it. Also, be sure to include a good explanation about how and why it's the correct solution to the problem. Thanks for helping out in the Community!
Idris Abdulwahab
Courses Plus Student 2,961 PointsIdris Abdulwahab
Courses Plus Student 2,961 PointsChristopher thank you so much for your help and hints. I understood what mistakes I made and your help got me through. I read your response before it was redacted by the last post. Cheers.