Looking for Prolog Assignment Help? – “Prolog Homework help” service for your Projects, Get Urgent Prolog Homework help Now

Prolog is basic logical coding language or in different words it’s a coding language in connection to fuzzy brain logic, artificial intelligence and used to mock brain powers like linguistic ability. Prolog programming assignments are assigned to students studying Artificial Intelligence in different computer science courses in colleges and universities. Students often get-tough Prolog assignment projects or papers which are difficult for students to do by themselves due to many reasons.

If you need any kind of assistance/help with Prolog programming assignments projects or papers then you are at right place JUST MAIL ME YOUR ASSIGNMENT and get it done before the deadline or you can get your Prolog programming project done within hours using our Urgent Programming Assignment Help service.

Prolog Programming Assignment Help

Few examples of basic Prolog Programming Assignments.

Prolog Programming assignment to codify Article I of the constitution of the United States of America

Assignment 2 – Tutorial Section 1 – Problem Statement:

  • Write a Prolog program for codifying Article I : Sections 1 to 4 of the Constitution of the U.S.
    • Your program should be able to handle queries of the following kind:
      • How are taxes apportioned to states?
      • When can the Vice President vote?
      • What are the conditions for a Journal entry?
    • Formulate atleast five more queries that your program should be able to handle.
      • Variations in parameters/arguments will not be counted as different queries.

Writing the Algorithm of the few sections of the constitution of the united states to check the eligibility of the candidate for voting.

These is an example to show the working of Prolog programming Language associated with artificial Intelligence. So It is not necessary that this example need to be constitutionally correct it is just a mere illustration for codifying the constitution  of the U.S.

The following code needs to be coded in PROLOG.

The algorithm has already been framed step by step and only needs to be implemented in the syntax of PROLOG. We are trying to codify certain sections of the Constitution of United States of America.

1.) Eligibility for representative

Algo:
Print : Enter age, duration of citizenship, state in which u reside and the state for which u want to contest elections.
User enters input age.
User enters duration of citizenship
User enters state in which he resides(String input1) and state for which he’s contesting elections(String input2)
If age entered>21 AND
If duration of citizenship>=7
AND String input1 EQUALS String input2,
print” Eligible”
else
print(” not eligible”)

2.) Eligibility to vote for the House of Representatives

Algo:
Print (Enter if you are a citizenship of US and enter if you are given the right to vote for law makers in the state’s larger legislative council)
User enters Boolean input1 and Boolean input2.
If both input1 and input2 are true, print (“Eligible”)
else print (“Not eligible”)

3.) Whether a separate election is needed

Algo:
Ask for Boolean input1: Print (” Representative’s death?”)
if input1=true
print (” allowed”)
else if input1=false
ask for Boolean input2 :Print (“Resignation?)
if input2=true
print(“allowed”)
else if input2=false
ask for Boolean input3: Print(“Removal from office?”)
if input3=true
print(“allowed”)
else print (“Not allowed”)
(This is a nested if else usage)

4.) Necessity of a president protempore

ask user to Enter Boolean input1.
Print (“Absence of Vice-president”)?
if boolean input1=true
print (“necessity”)
else
ask user to enter Boolean input2
Print(“Is vice president acting as president?)
if Boolean input2=true
print(“necessity”)
else
print (“Not needed”)

Prolog Code for the above algo:

%open this file in prolog and call either a1. , a2. , a3. or a4. and ENTER.

a1 :-
    (    
    writeln('Inputs must be followed by a dot and an ENTER.'),
    write('Enter age: '),
    read(A),
    number(A),
    write('Enter duration of citizenship: '),
    read(D),
    number(D),
    write('Enter the state in which you reside: '),
    read(S1),
    write('Enter the state for which you want to contest elections: '),
    read(S2),
    A > 21,
    D >= 7,
    S1 == S2    
    ->
    writeln('Eligible')
    ;
    writeln('not Eligible'),
    false
    ).

a2 :-
    (    
    writeln('Inputs are lower case booleans (true/false) and must be followed by a dot and an ENTER.'),
    write('Enter if you are a citizen of US: '),
    read(A),
    write('Enter if you are given the right to vote for law makers in the state\'s larger legislative council: '),
    read(B),
    A==true,
    B==true
    ->
    writeln('Eligible')
    ;
    writeln('not Eligible'),
    false
    ).

a3 :-
    (    
    writeln('Inputs are lower case booleans (true/false) and must be followed by a dot and an ENTER.'),
    write('Representative’s death? '),
    read(A),
    A==true
	->
	writeln('Allowed')
	;
	(
	write('Resignation? '),
	read(B),
    B==true
	->
	writeln('Allowed')
	)
	;
	(
	write('Removal from office? '),
	read(C),
    C==true
	->
	writeln('Allowed')
	;
	writeln('not Allowed'),
	false
	)
	).

a4 :-
    (    
    writeln('Inputs are lower case booleans (true/false) and must be followed by a dot and an ENTER.'),
    write('Absence of vice president? '),
    read(A),
    A==true
	->						
	writeln('Necessity')
	;
	(
	write('Is vice president acting as president? '),
	read(B),
    B==true
	->
	writeln('Necessity')
	)
	;
	writeln('not Needed'),
	false
	).

If you need Prolog Homework Help or want us to complete your programming project, assignment, or homework then you can reach out to us anytime for every general purpose or special programming language like above Prolog, Python, Ruby, pascal, C++, C, objective programming, SQL, Databases and MatLab.

Don`t Forget to check our reviews and that will give you more clarification about our work.

Just Contact us to get you Prolog Programming Now.