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

AI Index

Uploaded by

srav69003
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)
18 views2 pages

AI Index

Uploaded by

srav69003
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

Page

Program Number Teacher Signature

Write a pro-log program to calculate the sum of two


1 numbers. 1
Output
Write a pro-log program to find the maximum of three
2 numbers. 2
Output
Write a pro-log program to calculate the factorial of a
3 given number. 3
Output
Write a pro-log program to calculate the nth Fibonacci
4 number. 4
Output
Write a pro-log program, insert_nth(item, n, into_list,
result) that asserts that result is the list into_list with
5 item inserted as the n‘th element into every list at all levels. 5
Output
Write a Pro-log program to remove the Nth item from a
6 list. 6
Output
Write a Pro-log program, remove-nth(Before, After)
that asserts the After list is the Before list with the
7 removal of every n’th item from every list at all levels. 7
Output
Write a Pro-log program to implement append for two
8 lists. 8
Output
Write a Pro-log program to implement palindrome(List).
9 Output
9
Write a Pro-log program to implement max (X, Y, Max) so
10 that Max is the greater of two numbers X and Y. 10
Output

1
Index Page
Write a Pro-log program to implement maxlist
(List,Max)so that Max is the greatest number in the list of
11 numbers List. 11
Output
Write a Pro-log program to implement sumlist (List,Sum)
12 so that Sum is the sum of a given list of numbers List. 12
Output
Write a Pro-log program to implement two predicates
evenlength(List) and oddlength(List) so that they are true
13 if their argument is a list of even or odd length 13
respectively.
Output
Write a Pro-log program to implement reverse
14 (List,ReversedList) that reverses lists. 14
Output
Write a Pro-log program to implement maxlist (List,Max)
so that Max is the greatest number in the list of numbers
15 List using cut predicate. 15
Output
Write a Pro-log program to implement GCD of two
16 numbers. 16
Output

2
Index Page

You might also like