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

  1. If you were calculating a running total, which would be stored in a variable named total, what value would you assign to this variable at the start of the program?
    0
  2. What is the augmented assignment operator that adds the value on it's right to the value of the variable on it's left and assigns that new value to the variable?
    +=
  3. What is the augmented assignment operator that subtracts the value on it's right from the value of the variable on it's left and assigns that new value to the variable?
    -=
  4. What is the augmented assignment operator that multiples the value on it's right by the value of the variable on it's left and assigns that new value to the variable?
    *=
  5. What is the augmented assignment operator that performs regular division on the value of the variable to its left by the value on its right and assigns that new value to the variable?
    /=
  6. What is the augmented assignment operator that performs integer division of the value of the variable on its left by the value on its right and assigns that new value to the variable?
    //=
  7. Write a function header for function named max that takes two integers as parameters.
    def  max(num1, num2):
  8. Write an assignment statement that uses a function call to the function max, which takes two arguments, to give a value to the variable maximum. Use the values 5 and 10 in the function call.
    maximum = max(5, 10)
  9. What is a void function?
    a function that does not return a value
  10. What do you call the functions that are always available in Python and do not have to be imported?
    built-in functions