Write a prolog predicate for a list, Programming Languages

Assignment Help:

Write a Prolog predicate remove_nth(N,L1,L2) that is true if list L2 is just list L1 with its Nth element removed. If L1 does not have an Nth element then the predicate should fail. You can assume that N is strictly greater than 0. For instance:

?- remove_nth(4,[a,e,e,d,s,e],L).

L = [a,e,e,s,e] ;

No

?- remove_nth(6,[a,b],L).

No


Related Discussions:- Write a prolog predicate for a list

Python 2.7.3, I have assignment about python language . Could you helpe me ...

I have assignment about python language . Could you helpe me to built it

Lmc, Plan, design and dry run a program for the Little Man Computer (LMC) t...

Plan, design and dry run a program for the Little Man Computer (LMC) that produces the same result using a fixed number of 10 iterations.

Write a program to decrypt encrypted messages, You are working for a crypto...

You are working for a cryptography department, where one of your jobs is to decipher intercepted messages that have been encrypted using a book cipher. The messages are sent by dif

JavaScript Language , JavaScript is "Object Oriented" like C++ or Java. (No...

JavaScript is "Object Oriented" like C++ or Java. (Note that Java and JavaScript are not the same language, which is a common misconception) It also has variables, which makes Java

Simple corba program, You are working in charge of a group of programmers a...

You are working in charge of a group of programmers at a software company. Your task is to assess and research CORBA and to produce a report to be given to the programmers detailin

Nature of the empirical data in pascal programming, You will soon receive i...

You will soon receive in an email a personalized assignment that tells you the nature of the "Empirical Data" you are to produce with a Pascal program for HW3. HW3 is about generat

How will you add styles to a document, Question 1 How will you add styles ...

Question 1 How will you add styles to a document? Question2 How will you view XML in different ways? Question 3 Explain various file handling mechanism available in PERL

Assignment, Assignment for Networing&camunication

Assignment for Networing&camunication

Write a program to create map function, Given a list of numbers, say my ...

Given a list of numbers, say my @input_numbers = (1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144); write a program map1.pl that will use the function map (a) to produce a list of

Simple encryption, i have to make a program that encrypt a text to numbers,...

i have to make a program that encrypt a text to numbers, i don''t know what is wrong in my code, the example of what i need: text: hi >> number: 17 23

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd