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
Joshua Lawson
4,953 Points"Use dir() on float_a = 1.2" I am unsure how to do this. :(
This was on the Ints & Floats quiz.
I am unsure how to make a float and then use dir() ?
1 Answer
Dan Johnson
40,533 Pointsdir just needs an instance or a type. So you can call it in a lot of different ways:
float_a = 1.2
# All these calls will result in the same information
dir(1.2)
dir(float)
dir(float_a)
Joshua Lawson
4,953 PointsJoshua Lawson
4,953 PointsThank you very much.