Lesson 3: How to Think Like a Computer Using Boolean Logic

Yes: https://docs.logseq.com/#/page/6526bd80-9776-405e-b726-d6d1633d1606

  • Exercises
    1. What operator should you use when you want to see results that contain either of two search terms?
      • OR
    2. What operator should you use when you only want to see results that contain both of two search terms?
      • AND
    3. What operator should you use when you only want to see results that contain one search term but do not contain another search term
      • NOT
    4. True or False: given the following query, all blocks containing the link [[Hamlet]] will show in the results.
      a. [[Hamlet]] OR [[Shakespeare]]
      • True
        • It will query all blocks that contains Hamlet and that contains Shakespeare
    5. True or False: given the following query, all blocks containing the link [[Ghosts]] will show in the results.
      a. [[Ghosts]] NOT [[Shakespeare]]
      • False
        • It will hide results that contains Ghosts and Shakespeare at the same time
    6. True or False: given the following query, all blocks containing the link [[Sharespeare]] will show in the results. a. ``[[Shakespeare]] AND ([[Hamlet]] NOT [[Ghosts]])
      • False
        • It will hide results that contains Shakespeare that doesn’t contain Hamlet and contains Ghosts
1 Like