Kyle Blaine2,027 Points
Sillycase.py - how to check my code?
Hello all, trying to complete the challenge for sillycase, and here's the code I threw together. I feel like I'm on the right track, but keep getting "BUMMER: Be sure to use integers for indexes.
// will be needed!"
I guess we haven't really gotten to a "step-by-step debugging" phase, but I'm having trouble passing arguments into the function in workspaces as well. If I call sillycase("string"), I get the error: "TypeError: 'module' object is not callable"
Seeing as the challenge environment is rather vague, I'm not really sure where I'm actually going wrong...
I imagine my mistake is really simple, but a nudge in the right direction will send me miles. Thanks in advance! :)
def sillycase(str): arg_string = str length = int(len(arg_string)) silly = arg_string[0:length] theRest = arg_string[-length:0] arg_string = str(silly.upper) + str(theRest) print(arg_string)
You might need to start over from scratch. There are so many little mistakes spread all over the place.
- You are taking in a parameter called
str, but later you are trying to call it?
- What is
- Why are you
Read this other post I wrote a year ago.