Appendix C. Answers to the Practice Questions

This appendix contains the answers to the practice problems at the end of each chapter. I highly recommend that you take the time to work through these problems. Programming is more than memorizing syntax and a list of function names. As when learning a foreign language, the more practice you put into it, the more you will get out of it. There are many websites with practice programming problems as well. You can find a list of these at http://nostarch.com/automatestuff/.

Chapter 1

  1. The operators are +, -, *, and /. The values are 'hello', -88.8, and 5.

  2. The string is 'spam'; the variable is spam. Strings always start and end with quotes.

  3. The three data types introduced in this chapter are integers, floating-point ...

Get Automate the Boring Stuff with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.