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 trialAndriy Bobrovych
4,781 Pointsi don't understand that task
Hi. a don't understand what i must do in this task
# EXAMPLE
# random_item("Treehouse")
# The randomly selected number is 4.
# The return value would be "h"
import random
def random_item(iter):
retur = random.randint(0, len(iter) - 1)
r
3 Answers
Alx Ki
Python Web Development Techdegree Graduate 14,822 PointsHi, Andriy Bobrovych!
Your code is right just not finished.
import random
def random_item(iter):
indx = random.randint(0, len(iter) - 1)
return ................
All you need is to return your iter's [indx] item.
Alx Ki
Python Web Development Techdegree Graduate 14,822 PointsHenry Garmendia , trying to answer your question:
- Don't know yet)). I need a couple more months to finish techdegree. But I also have 9 projects done and it feels so good!
- If you mean money, asking about worth, then yes. I pay 99$/month for structured and nicely organized courses. Even here in Russia such courses are more expensive and much worse at the same time.
- Talking about the most important thing - getting job, can say nothing for now.. But I'll do my best)
And what do you think?
Henry Garmendia
Courses Plus Student 11,762 PointsSounds good, I was thinking about paying for Techdegree myself but I wasn't sure if it was worth the try... So, it is alot different then the courses as a Pro student? I would like to follow your progress on GitHub if you don't mind, and check your projects out.
Alx Ki
Python Web Development Techdegree Graduate 14,822 PointsI didn't have a Pro account. Had ~24$ one. Kind of basic or something like that. Henry Garmendia , sure, follow me on GitHub.
Henry Garmendia
Courses Plus Student 11,762 PointsI sure will, I would like to see the projects you been working on...
Henry Garmendia
Courses Plus Student 11,762 PointsHenry Garmendia
Courses Plus Student 11,762 Points@alexey did it really worked being a Techdegree Student, is it worth it?
Andriy Bobrovych
4,781 PointsAndriy Bobrovych
4,781 Pointsi now, i have not read an example, already done. Thank you!!