Chapter 1 Programming Questions

  1. Try the following steps:

    1. Start the Python interpreter in interactive mode.

      1. At the »» prompt, type the following statement

        1. print (‘This is a test of the Python interpreter.’)

      2. After pressing the Enter key, the interpreter will execute the statement. If you typed everything correctly, your session should look like this:

        1. »»print (‘This is a test of the Python interpreter.’)

          This is a test of the Python interpreter.

          »»

    2. print (‘This is a test of IDLE.’)

  1. Use what you’ve learned about the binary numbering system in this chapter to convert the following decimal numbers to binary:

    1. 11

    2. 65

    3. 100

    4. 255

  2. Use what you’ve learned about the binary numbering system in this chapter to convert the following binary numbers to decimal:

    1. 1101

    2. 1000

    3. 101011

  3. Look at the ASCII chart in Appendix C and determine the codes for each letter of your first name.

robot