Study

Python 201 Mid-Semester Review

  •   0%
  •  0     0     0

  • What is the index of the first element in a list?
    0
  • What will be printed?
    giraffe
  • What will be the value of the "total" variable?
  • What will be printed?
    dory
  • HTTP stands for...
    HyperText Transfer Protocol
  • Before a function is called, it must be...
    defined
  • What two things are needed to call a function?
    Function name, parentheses
  • What comes after "def" when defining a function?
    The function name
  • True or False: Lists are stored sequentially (in order)
    True
  • True or False: Dictionaries are stored sequentially (in order)
    False
  • What will be printed?
    5
  • What is the keyword needed to define a function?
    def
  • Each command in the body of a function must be...
    indented
  • Which function lets the user enter information into the console?
    input
  • Which library can retrieve data from the internet through HTTP?
    requests
  • Who is this man?
    Guido van Rossum
  • What was the name of one of the first chat bots?
    Eliza
  • What will be the value of the "bark" variable?
    grey-brown
  • What will be printed when this code runs?
    Hi, Benjamin!
  • True or False: It is possible to have a List containing Dictionaries
    True
  • What comes after the parentheses in a function definition?
    colon
  • Which library can parse HTML text into Python data structures?
    BeautifulSoup
  • Which keyword can be used to pull in code from libraries?
    import