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 trialtariqasghar
UX Design Techdegree Graduate 30,519 PointsPoint of "question_start" and question_end" times in "ask" method.
Hello,
In the quiz class. The method "ask" calculates question start and question end times difference. I don't see Kenneth using the returned time difference inside the "take_quiz" method.
Also, I noticed more than one value (correct and time difference) is being returned in "ask" method. How do you access that?
1 Answer
Chris Freeman
Treehouse Moderator 68,441 PointsGood question. Kenneth defines the ask
method to return a tuple of correctness, and time used for each question. The correctness is accessed using answer[0]
. The individual question time could be accessed using answer[1]
, but he opted not to. Instead heβs calculating the overall time rather than looping and adding up the individual times.
Perhaps the individual time data might be used for another purpose later on.
Post back if you need more help. Good luck!!!