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 trialZvisinei Nyamweda
2,646 PointsWhat's Kaoa
Mr. KenLove im stuck on the kaoa, i dont get wat kaoa is and how it is odd
def first_4(num):
num = [1,2,3,4,5,6]
return(num[0:4])
def odds(numodd):
numodd = list(range(8))
return(numodd[1::2])
2 Answers
Vittorio Somaschini
33,371 PointsHello Zvisinei.
"kaoa" is what your function is returning.
The code challenge has the word "Oklahoma" as the default iterable when it checks your code. The error message provides you with the returning output so that you can understand what is going wrong.
Also, please note that you only need to return the slice as requested byt the code challenge, no need to declare a list variable.
Vittorio
Zvisinei Nyamweda
2,646 Pointsthanx got it to work
beven nyamande
9,575 Pointsbeven nyamande
9,575 Points