Program Development

There are several full length programs in the book. I would like you to copy these pieces of code and get them to run. Your code must have the following template:

def main():
  # the body of the program
  ...

main()
Each program will be in a file by itself with .py extension. You must make sure that it runs as shown in the book. These programs do NOT have to be turned in. However, you are likely to see variations of these programs in the quizzes.

There are several places in the book that are denoted as check points. I would like you to copy or write these pieces of code and get them to run.

Your code must have the following template:
def main():
  # 4.2

  ...
   
  # 4.12

main()
Make sure that this program runs and that you are familiar with the output of the statements that you wrote. This program does NOT have to be turned in. However, you are likely to see variations of this program in the quiz on Friday.

Please write answers to the following questions: