1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to MongoDB in Python

Connected

Exercise

The $or operator

You want to create a list of high-quality movies and want to design criteria for your selection: the movie needs to have won an Academy Award (also known as an Oscar), or have a rating higher than 7.5. As well as the $or operator, you will need the $gte operator, short for greater than or equal to.

Instructions

100 XP
  • Complete the oscar filter on "won_oscar" to reflect the first condition.
  • Complete the high_rating filter on "rating" to reflect the second condition. Use "$gte".
  • Combine the two criteria using $or to find all movies that match one or both of the criteria.