IT 116: Introduction to Scripting
Quiz 1 Answers

  1. What is an argument?
    a value given to a function when it is run
  2. Where do arguments appear in a call to a function?
    inside parentheses right after the function name
  3. What is a string?
    a sequence of characters
  4. What is a string literal?
    a string written out directly inside a Python statement
  5. What is an expression?
    anything that can be turned into a value
  6. What is the name of the function used to read input from the keyboard?
    input
  7. What is purpose of the argument to the function mentioned above?
    text used to prompt the user for a value
  8. Write an assignment statement that asks the user for his or her name and assigns it to the variable name.
    name = input("Please enter your name: ")
  9. Write an assignment statement that asks the user for an integer, converts it to the correct data type and assigns it to the variable number.
    number = int(input("Please enter an integer: "))
  10. Name the three data types we have discussed in this class.
    integer, decimal, string
        or
    int, float, str