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 trial

Python Python Collections (2016, retired 2019) Slices sillyCase

jimvichos
jimvichos
4,700 Points

Works fine on IDE here is says Bummer? :(

When i run it on my IDE its all good but here says that it has a problem and i have to try again i cant understand if it is a logical problem or a syntax problem but i need help.

sillycase.py
def test(num):
  mid = int(round(len(num) / 2))
  end = int(len(num))

  text = num[0:mid].lower() + num[mid:end].upper()
  return text

name = "Treehouse"

print(test(name))

Where's num coming from?

jimvichos
jimvichos
4,700 Points

Alexander Davison check again i fixed it it was the wrong one this is the one!

1 Answer

Steven Parker
Steven Parker
231,275 Points

The instructions say to "create a new function ... named sillycase", but this one is named "test" instead.

Also, you only need to define the function, you don't need to call it or to print anything.