Count and total selected ticket prices

A ticket service stores original ticket prices in US dollars. It selects prices of at least 12 dollars and reduces each selected price by 2 dollars:


Python
prices = [9, 14, 6, 14, 20]
offer_prices = [price - 2 for price in prices if price >= 12]


Find the number of elements in offer_prices and the total of its prices in US dollars. Enter both answers as exact integers.

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: