![]() ![]() ![]() Run the program from an already-open terminal. Hopefully this helps others who might be starting out and still haven't figured out how the computer thinks yet. In this next example, I use double quotes and it won't work because it thinks there is a break in the quotes between "the" and "function" even though when you read it, your own mind can make perfect sense of it: print("You have reached the end and the "input()" function is keeping the window open") "raw_input()", it will think it is a function, variable, etc, and not text. (2) Use single quotes to indicate a string otherwise if you type doubles around anything, such as (1) In python 3, there is no raw_input(), just ![]() This next example would give you a clear message that the program is done and not waiting on another input prompt within the program: print('You have reached the end and the "raw_input()" function is keeping the window open') This would just show a cursor with no text: raw_input() To just keep the window open I agree with Anurag and this is what I did to keep my windows open for short little calculation type programs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |