IT 116: Introduction to Scripting
Answers to Class 5 Ungraded Quiz

  1. What is the result of the following calculation in Python's interactive mode?
    7 / 2
    3.5
  2. What is the result of the following calculation in Python's interactive mode?
    7 // 2
    3
  3. What is the result of the following calculation in Python's interactive mode?
    7 % 2
    1
  4. What is the result of the following calculation in Python's interactive mode?
    7 ** 2
    49
  5. What is the result of the following calculation in Python's interactive mode?
    2 + 3 * 5
    17
  6. What is the result of the following calculation in Python's interactive mode?
    (2 + 3) * 5
    25
  7. What arithmetic operators have the highest precedence (parentheses are NOT operators)?
    **
  8. What arithmetic operators have the next highest precedence?
    *, /, //, %
  9. What arithmetic operators have the next lowest precedence?
    +, -
  10. What would you type at the end of a line if you wanted to continue a Python statement to the next line?
    \ (backslash)