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 trialTimothy McCune
6,744 PointsThere are at least 2 correct answers to the question, how do you exit the python interpreter
I just wanted to point out, that the first quiz, in "Python Basics", only accepts exit() as the only correct answer, to "How do you exit the python interpreter?". You can go ahead and give it a try, but quit() will also exit the python interpreter.
To summarize, there are more than 1 correct answer to the question, "How do you exit the python interpreter?"
exit() and/or quit()
Perhaps you guys could change that in the quiz?
Thanks, Tim McCune
5 Answers
Chris Freeman
Treehouse Moderator 68,441 PointsDid you say two ways? In the Python Basics Python and the Shell quiz, I see three ways to answer the question: exit(), quit(), and Ctrl-D, as shown below:
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>>
I personally use quit()
to exit to keep from accidentally typing exit
when in the bash shell and loosing my window.
Tagging Kenneth Love for quiz update comment.
Kenneth Love
Treehouse Guest Teacherctrl-d
isn't a function, though, and the question specifically asks about functions. Both quit()
and exit()
, which are functions, are accepted answers.
Chris Freeman
Treehouse Moderator 68,441 PointsI beg to differ: I think there is a bug in the checker. As you can see in this picture, quit()
was not accepted.
Kenneth Love
Treehouse Guest TeacherOops, you're right! I was certain I had changed that one before. Maybe it was another quiz question somewhere.
It's updated to accept quit()
and exit()
(and their non-called forms) now.
Chris Freeman
Treehouse Moderator 68,441 PointsWhat? no up vote? :-P
MUZ141141 Cleopass Kapembeza
677 Pointsi think quit is good to use there
MUZ141141 Cleopass Kapembeza
677 Pointsi agree with you guys quit() and /or exit