Code POC
Tutorials
Blogs
Search
Categories
Feeds
Prolog Tutorial
Prolog Basics
Search Programs
Game LT
program to define a relation dividelist (L,L1,L2) so that L is partitioned into L1 and L2 where length of L1 and L2 are almost same
program to find factorial of given number
Program to create a window and input a new string, remove the window and text, write to existing window
program to reverse a list using concatenate
program to check whether a number is a member of given list or not
ProLog Program to read 10 integers in a list and 10 from the database and find 2nd maximum of all of them
program to define the relation shift(List1, List2) so that List1 shifts rotationally by one element to the left
Prolog program to read a file and display each of its line one by one and lines chosen by user should go to an output file
Program to find grade
Program to find relations
program to insert an element anywhere in the list
Program to display item name, code, quantity, price and grade
Program to find easy courses person likes
Predicate logic representation and then converting them to prolog, prove the proof.
Program to sort the list of integers using Insertion Sort
program to delete an element from a list using concatenate
program to read 10 strings into a list and display similar characters
Program of parent and predecessor
program to check whether a given word is a palindrome or not
program to delete an element from a given list
ProLog Program to read list of strings and numbers and copy in database having having string length equal to number using files
program to check whether a given list is palindrome or not
Prolog program to store cricket players details in the database
Program to find maximum number from inputted numbers
Program for Monkey and banana
program to find the nth element of a list
program to generate first 10 prime numbers and store them in a list
program for solving the blocks problem using hill climbing
program to find last item of the list
program of 8-puzzle using heuristic function % with best first search technique
program to define the relation last(item,list) so that item is the last element of the list without the use of concatenate
Program of asking question
Program to buy and sale cars
program to merge two ordered list generating an ordered list
Prolog program to print numbers from 1 to 25 and display output as shown in description
Prolog problem of murder mystery
Problem Solving
Design a game based on 5*5 matrix and two players moving in spiral way to the center given the dice value
program of Fibonacci Series
program to read two strings and then output the third string which is a concatanation of the both excluding reapiting characters
Production system for the Missionary cannibal problem
program to print the zodiac sign of a given birth date
program to use of list
Prolog program to create a database of Employees containing EmpNo, EmpName, Emp Spouse Name, children and print Employee children having a given age
program to add an element to the begining of a list
Program to print message
Program to find relations in family
program of login page
program to add an element in a head position in given list
Prolog program of Water Jug Problem start with state(0,0) and end with(2,0)
Program to search record by name and phone number
Sort Programs
Program of Game EX
program to find whether the length of a list is even or odd
program of string token
Program to generate facts of the family and take different relations
Program that defines a relation split(L,P,N) where list is divided into positive, negative numbers without using cut
program to find sum of all the numbers in a given list
Prolog program to display number of user entered books available in 2 different databases
program to define the relation shift(List1, List2) so that List1 shifts rotationally by one element to the right
Prolog program to read a sentence from a file and then copy each of the token one by one into a list
Program to print user entered number
Program of marcus
program to check whether a year is a leap year or not
Program to compare character and string
Prolog program of Medical Diagnostic system
program to rotate a list n places to the left
Basic Programs
Program of Bubble Sort
program to delete an element from a given list without using concatenate
program to read a list of strings , integer and display all the strings with the closest length of the integer entered should go to a new list
Program to find murderer
program to find the permutations of a given list i.e. to find all possible combinations of the elements of a list
program to find the last element in a given list
ProLog Program to read a file and create a list of all words of it
program to reverse a given list
Prolog program to read and write file
ProLog Program to find length of names
Program of teacher and lecture
program to generate the sublist of a given list
program to compare characters, strings and also reverse string
program to solve the 4-3 Gallon Water Jug Problem
PROGRAM TO SPLIT A LIST IN TWO LISTS SUCH THAT ONE LIST CONTAINS NEGATIVE NUMBERS AND ONE CONTAINS POSITIVE NUMBERS
Program to sort a list using Quick Sort
program that defines a relation count(A,L,N) that counts into N the number of occurrences of the element A in the list L
program to find summation of list of numbers
Program to buy car and truck
program to write the elements of the list line by line
program to concatenate two lists giving third list
ProLog Program to read list of strings and numbers and copy in database having having string length equal to number
program of predicate ordered (List) which is true if List is an ordered list of numbers
Prolog program to read 10 string and store them in database and then write the string in increasing order of their length to other database
File and Database Programs
program of spiral game
Program that defines a relation max(X,Y,Max) where Max is the greater of X and Y
program to read an integer and display each digit with the respective frequencies of it
program for family hierarchy
program of person hobbies
program Define the relation last(item,list) so that item is the last element of the list using concatenate.
Program to convert decimal number to roman number
Program to find animals leaving in water and land
program that defines a predicate maxlist (L,Max) where Max is the greatest number of the list
program to add an element in a last position in given list
Predicate logic representation and then converting them to prolog, prove the proof.
Program of searching a students data when Name or a phone no is input
Game
Game
program to define two predicates evenlength(List) and oddlength(List) so that they are true if their argument is a list of even or odd length
Prolog Multi-List Program
Program to run marriage burro
Program to find the names of all the student who have obtained marks greater than equal to the Marks in the Subject specified at the goal prompt
program to find the length of a given list
Prolog program to create a database of teachers containing, TeacherName, List of subjects taught and for given teacher, display no of lectures require
program to define the relation translate(List1, List2) to translate a list of numbers between 0 and 9
Prolog program to read file and create list of all the lines of it. Each list in turn should be list of word.
Program to add and multiply numbers
Program to find grade
program to concatenate two lists, an element is a member of a given list or not, reverse a list and delete a list
program to read number
Prolog program of Parent Tree
Program to search car by company name, car name, price, class, color...
Back to Tutorials