Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Assessment: Example 1: A. Write a prolog program to print a list of Strings, and test your program with the list (apple,banana,kiwi,orange) Given the

image text in transcribed

Lab Assessment: Example 1: A. Write a prolog program to print a list of Strings, and test your program with the list (apple,banana,kiwi,orange) Given the list below: [(apple,5.2),(orange, 3.25),(banana,5.50),(kiwi, 7.75),(apple,7.95)] B. Use length_of_list(L,R) program to find length of the list C. Use member(X,L) rule to write queries that will find the answer to the following statements: First query is given as an example, 1. List the available prices for apple Member((apple,x),[(apple, 5.2), (orange, 3.25),(banana,5.50), (kiwi, 7.75),(apple, 7.95)) X=5.2 X=7.95 false 2. List all available fruits 3. Show how much kiwi cost 4. List fruits that cost more than 4.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions