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

  1. Write an expression that returns True if the string "ox" is contained in the string pointed to by the string variable team.
    "ox" in team
  2. Write an expression that returns True if the string "ox" is not contained in the string pointed to by the string variable team.
    "ox" not in team
  3. Under what conditions will the string method isalnum() return True.
    when the string contains only letters and digits and is not empty
  4. Under what conditions will the string method isalpha() return True.
    when the string contains only letters and is not empty
  5. Under what conditions will the string method isdigit() return True.
    when the string contains only digits and is not empty
  6. Under what conditions will the string method islower() return True.
    when the string contains only lower case letters and is not empty
  7. Under what conditions will the string method isupper() return True.
    when the string contains only upper case letters and is not empty
  8. Under what conditions will the string method isspace() return True.
    when the string contains only whitespace characters and is not empty