Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
index problem. task 2 isnt passing. dont know why.
Task one worked fine- line 1: var1-'redout', line 2: var1.index('t') passed.
Task 2/ line 1: var2=treed, line 2: var2.index [-2] should return a value e but isnt working. Keeps taking me back to task one which has already passed and telling me Task one not passing...
##var1='redout' ##var1.index('t') var2='treed' var2 [-2]
See the task just wants you to define 2 variables
var2 and not return anything.
So you code should look like this:
var1 = 'redout' var2 = 'tuoder'
didnt work. I have to create a var2 with letter 2 at index -2 and then try to get it to return that value. Given my code, it should return e when i ask it for var2[-2], but it isnt.