7-Conjunctions(AND , OR) [PROLOG]

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 23

  • @31425
    @31425 2 роки тому +6

    Fantastic serie of videos. I needed all of this, to pass my exam. You are a true hero, Sir!

  • @gorrejayasai07
    @gorrejayasai07 Рік тому +4

    likes(mary,chocolate).
    likes(mary,wine).
    likes(mary,burger).
    likes(john,wine).
    likes(john,mary).
    likes(john,burger).

  • @venkatehyadav
    @venkatehyadav 5 років тому +5

    hi , your videos are excellant... easy to understand. Thank you. please videos on BFS and DFS other algorithms

    • @techdose4u
      @techdose4u  5 років тому +1

      Thanks but i have stopped making videos on PROLOG.

  • @jz2710
    @jz2710 2 роки тому

    Nicely done Sir.

  • @Huda-dq9tm
    @Huda-dq9tm 5 років тому +3

    Is there a way of asking - What are all the things liked by John and not Mary adn vice-versa?

    • @techdose4u
      @techdose4u  5 років тому +8

      I did it by adding does_not_like. I could not find a way of solving your query using in-built operators. My solution goes like this :- (It mentions the things that mary does not like)
      DATASET:-
      likes(mary,chocolate).
      likes(mary,wine).
      likes(mary,burger).
      likes(john,wine).
      likes(john,mary).
      likes(john,burger).
      likes(john,drinks).
      likes(john,oranges).
      does_not_like(mary,drinks).
      does_not_like(mary,oranges).
      does_not_like(mary,news).
      QUERY:-
      likes(john,X),does_not_like(mary,X).
      ANSWER:-
      X = drinks ;
      X = oranges.
      NOTE: If you have or find any other better solution then do let me know :)

    • @Huda-dq9tm
      @Huda-dq9tm 5 років тому +1

      @@techdose4u That's great. Thanks.

    • @soutrickroychowdhury3468
      @soutrickroychowdhury3468 5 років тому

      @@techdose4u Good bro.

  • @quvomiddinkamalov3292
    @quvomiddinkamalov3292 Рік тому

    Thank you

  • @ChitralInside
    @ChitralInside 4 роки тому

    Sir what if we need the second option in our variable. As when we initialize our variables then it always initialize with the very first possible. And now i want that how can i initialize this variable with the second possibility by ignoring the first one.

  • @malik4islam
    @malik4islam 3 роки тому

    What’s the rule for PERSON(A)?

  • @charbilysf7592
    @charbilysf7592 Рік тому

    Sir i love u

  • @dishantisrani2609
    @dishantisrani2609 4 роки тому +1

    I guess the things have been updated because now the and condition is '^' maybe can you please check and say

  • @anayaturrehman976
    @anayaturrehman976 4 роки тому

    Love u

  • @mkthakral
    @mkthakral 3 роки тому +10

    In real life also, John likes Mary and Marry does not like John.

    • @IndianTige1
      @IndianTige1 2 роки тому +1

      i dont even know wtf is john and mary

    • @jubayeralam8358
      @jubayeralam8358 7 місяців тому +3

      John likes chicks tho

    • @khushal_18
      @khushal_18 6 місяців тому +2

      John likes chicks 💀

  • @karma_kar9623
    @karma_kar9623 Рік тому +1

    It's always John likes Mary never Mary likes John 😢

  • @mkthakral
    @mkthakral 3 роки тому

    The "OR" example seems wrong, the "OR" condition should be applied on query, not on answer. The shared "OR" example seems to be of "AND" condition.