Track comprehension variables across assignments

A scheduler builds new lists of integer priority scores using the following Python 3 code. Determine the requested values after all four statements have executed.


Python
priority = 99
priorities = [8, 13, 21]
adjusted = [priority - 3 for priority in priorities]
priorities = [entry * 2 for entry in adjusted]


Report these three quantities as exact integers:

  • Outer priority: the final value of priority.
  • Middle adjusted score: the value of adjusted[1].
  • Last rebuilt priority: the value of priorities[2].
Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More List Comprehensions Questions: