thanks for making this videos on prolog ,i just need it for my exams
@techdose4u5 жыл бұрын
Welcome :)
@CSBAjay4 жыл бұрын
Sir u just nailed it , thank u so much sir
@techdose4u4 жыл бұрын
Welcome :)
@VADroidTS5554 жыл бұрын
Thank you!
@techdose4u4 жыл бұрын
Welcome
@m_stifeev4 жыл бұрын
How can we deal with the problem, that we can't compare X using '=
@m_stifeev4 жыл бұрын
In PC version of SWI-interpretator this is the problem.
@techdose4u4 жыл бұрын
@@m_stifeev Can't we write a stopping condition at the start of the recursion call that if any or both are empty then return a required value?
@m_stifeev4 жыл бұрын
@@techdose4u thanks for answering, but finally I found better solution: is_sorted([]):- !. is_sorted([_]):- !. is_sorted([A,B|T]):- A =< B, is_sorted([B|T]).
@VADroidTS5554 жыл бұрын
@@m_stifeev in pure prolog style of programming, ! Isn't used.
@shikasi2 жыл бұрын
There is a problem with this program, which is that you cannot use a variable in the terminal to check for all the values of the variable for which the program results in true.
@darshanhr12133 жыл бұрын
How to check for the String list ?
@shuvranilsanyal4453 жыл бұрын
How to check if it is ascending or descending?
@SamanviKhushi4 жыл бұрын
Hello sir, can you help me in understanding this query. should i first sort and then check whether its sorted or not. or just check. Write a predicate sortedList/2 that is true if the second list is the first list sorted. You may of course not use any built-in sorting procedures, but you can use commands like delete/3 and min/2. Hint: First write a predicate smallestElement(Xs,X) that is true if X is the smallest element in X. Ex : ?-sortedList([2,1,3],[1,2,3]). true