IT 116: Introduction to Scripting
Quiz 8 Answers

  1. What permissions does an account need on a Python script to be able to run it without typing the name of the Python interpreter on the command line?
    read and execute permission
  2. What is the name of the special line we use to run a Python program without directly calling the interpreter?
    the hashbang line
  3. Where must this special line appear?
    the very first line of the script
  4. What are the first two characters of this special line?
    #!
  5. What must follow these two characters? I don't want the actual value, I want you to tell to describe what it is.
    the absolute address of the Python interpreter
  6. What is a syntax error?
    an error caused by code that is not legal in Python
  7. What is a logic error?
    an error that causes the code to give incorrect results
  8. What is a runtime error?
    an error that causes the Python interpreter to stop running
  9. What type of statement can be used to deal with an exception?
    a try/except statement
  10. What happens when an exception is encountered in the try block of such a statement?
    the interpreter stops running the code in the 1st block and jumps to the code in the 2nd block