CS 227 Lecture -*- Outline -*- * Interactive Programming (Chapter 6) ** batch So far, our programs have been "batch" programs with I/O done by Scheme. That is, we type an expression, Scheme reads, evaluates, and then prints the result. But input is not under control of the program, and we do not get to print intermediate steps, or output formatted the way we want. ** interactive Now, we will explore how to do that: interactive programming, adapting what we learned about tracing. This will be programs like the "whos on first?" program. ** preview We look at I/O. I/O involves strings, and so we review what we learned about strings first. I/O is a side effect, so we look at begin again (implicit begin 6.3). Then we write some programs that interact with the user, including a square root program, the Towers of Hanoi, and the Eight Queens problem. Along the way, we will investigate backtracking, a technique useful in Artificial Intelligence.