0% found this document useful (0 votes)
14 views2 pages

Ai Index Sem-6

All index

Uploaded by

posemkr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Ai Index Sem-6

All index

Uploaded by

posemkr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

BCA Semester - VI

Assignment Question-
Artificial Intelligence (CORE-XIII)
Page
SL Topic Remarks
No
Write a prolog program to calculate the sum of two numbers. 1
1
Write a prolog program to find the maximum of two 2
2
numbers.
Write a prolog program to calculate the factorial of a given 3
3 number.
Write a prolog program to calculate the nth Fibonacci number. 4
4
Write a prolog program, insert_nth(item, n, into_list, result) 5
5
that asserts that result is the list into_list with item inserted as
the n‘th element into every list at all levels.
Write a Prolog program to remove the Nth item from a list. 6
6
Write a Prolog program, remove-nth(Before, After) that 7
7
asserts the After list is the Before list with the removal of
every n‘th item from every list at all levels.
Write a Prolog program to implement append for two lists. 8
8
Write a Prolog program to implement palindrome(List). 9
9
10
10 Write a Prolog program to implement max(X,Y,Max) so that Max is
the greater of two numbers X and Y.
. Write a Prolog program to implement maxlist(List,Max) so 11
11
that Max is the greatest number in the list of numbers List.
Write a Prolog program to implement sumlist(List,Sum) so 12
12
that Sum is the sum of a given list of numbers List.

13 Write a Prolog program to implement two predicates


evenlength(List) and oddlength(List) so that they are true if their 13
argument is a list of even or odd length respectively.
14 Write a Prolog program to implement reverse(List,ReversedList) 14
that reverses lists.
15 Write a Prolog program to implement maxlist(List,Max) so that 15
Max is the greatest number in the list of numbers List using cut
predicate.

16 Write a Prolog program to implement GCD of two numbers.


16
17 Write a prolog program that implements Semantic 17
Networks/Frame Structures.

You might also like