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 trialAmit Ramjee
702 PointsHow does the shell know to print the "Do you want to proceed" option without PRINT function?
How does the shell know to print the "Do you want to proceed" option without PRINT function? I thought you always need the PRINT function to display output to the user? At the point where Craig does,
should_proceed = input("Do you want to proceed? Y/N? ")
1 Answer
Steven Parker
231,268 PointsThe "input" statement is another way to display output; but after the output is shown, it waits for the user to input a response. The user's response is then returned as the value of the function. So you might think of "input" as short for "print_and_wait_for_input".
Amit Ramjee
702 PointsAmit Ramjee
702 PointsThanks, that's helpful. Used to having to PRINT input lines out in java.
Steven Parker
231,268 PointsSteven Parker
231,268 PointsI've found that knowing other language(s) is both helpful and an opportunity for confusion when learning new ones!
Glad I could help. Happy coding!