Sets and Set Methods

  1. Set Operations

    Question 1 of 2

      Ask user for movies released in year 2025 and store as set. Ask user again for movies watched (any year) and perform following
      1. Find movies released in 2025 that user has watched
      2. Find movies released in 2025 that user has not watched
      3. Find movies watched by user that were not released in 2025
      Daaraz found that their top electronic gadget buyer's are ram, shyam, sita, hari. Cosmetic buyers are hari, sita, gita, rita. Top grocery buyer's are ram, hari, gita and rabi. Find:
      1. Customers are top buyers of all electronics, cosmetics and groceries
      2. Customers who are top buyer of single category only
      3. Customers who are top buyers of exactly two categories
      4. All unique customers who are top buyers of at least one category
      5. Customers who are top buyers of electronics but not cosmetics
  2. Data related Operations

    Question 2 of 2

      Store list as ["book", "book", "pen", "pen", "pen", "pencil", "marker", "notebook"]
      1. Save unique items sold in stationary shop in a set as unq_items_set and display the result
      2. Find and display total number of unique items sold in stationary shop
      3. Add sticky_notes to unq_items_set set and display updated set
      4. Remove pen from unq_items_set set and display updated set
      5. Check if stapler is present in unq_items_set set and display result
      6. Remove eraser from unq_items_set and display result. Shouldn't give error if not present
      7. Assign new_items as ["highlighter", "chart_paper"]. Add all items from new_items to unq_items_set and display updated set