The problem with putting input at the end of a program is: if the program raises an exception you won't see it.