Chapter 2 - Programming for Everybody (Getting Started with Python) 2019 Answers


Other answers
  1. In the following code, print 98.6. What is “98.6”?
    • A constant
  2. In the following code, x = 42. What is “x”?
    • A variable
  3. Which of the following variables is the “most mnemonic”?
    • hours
  4. Which of the following is not a Python reserved word?
    • speed
  5. Assume the variable x has been initialized to an integer value (e.g., x = 3). What does the following statement do? x = x + 2
    • Retrieve the current value for x, add two to it and put the sum back into x
  6. Which of the following elements of a mathematical expression in Python is evaluated first? –Parenthesis()
  7. What is the value of the following expression
    • 2
  8. What will be the value of x after the following statement executes: x = 1 + 2 * 3 – 8 / 4
    • 5
  9. What will be the value of x when the following statement is executed: x = int(98.6)
    • 98
  10. What does the Python raw_input() function do?
    • Pause the program and read data from the user
artemkopytko