Back to the 2022 paper

Module 2: Knowledge Representation and Reasoning

20227m

Write a Prolog program that verified whether an input list is a palindrome.

Hint:
Goal : Palindrome ([r, a, c, e, c, a, r])
Output : Yes
Goal : Palindrome ([a, b, c])
Output : No

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.