IT 117: Intermediate Scripting
Quiz 1 Answers

  1. What are the four types of expressions?
    literals, variables, calculations with operators and function calls
  2. How many arguments does the range function take?
    one, two or three
  3. What arguments would you give range to get the odd numbers from 1 to 5?
    1,6,2
  4. What statement allows a function to return a value to the function call.
    return statement 
  5. Write the Python statement to create a file object for reading on the file students.csv
    file = open("students.csv", "r")
  6. To make a script executable, what permissions must the script have?
    read and execute
  7. What special line must be added to a script to run it without typing python3 on the command line?
    hashbang line
  8. What do you call a collection of things stored one right after another?
    a sequence
  9. What are the three data types that are a collection of things stored one right after the other.
    lists, tuples and strings
  10. What is the string method that breaks up a string into a list of values?
    split