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.

Jason Williams
453 PointsPython Basics, Stage 6 Challenge
okay, I'm a newbie and I'm struggling with this challenge. I've tried all ways to solve this and can't seem to manage it. I really need a hint because I don't know what I'm missing. Thanks, Jason
import random
def random_num(num):
random.randint(1,num)
random_num(6)
1 Answer

Jason Anello
Courses Plus Student 94,592 PointsHi Jason,
You're getting the random number but you're not doing anything with it.
The challenge is asking you to have the function return
that random number.
Also, in general you don't have to call your functions you only have to write them. The code challenge will call your functions to test them.
Jason Williams
453 PointsJason Williams
453 PointsThat worked, appears so obvious to you. I'm jealous! Thank you