[SOLVED] CSE140 Assignment 1

25.00 $

Category: Tags: , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon 2021507_Assignment1-jehz3d.zip (102.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Q1. Students of a school are standing in a row for drill practice.

a. Find if the student ‘P’ is present at the position ‘U’ in the row b. Find the length of the row

Write a prolog program to solve the question.
Assume row consists of names of students denoted by unique value.

Assume the same situation as previous question where students are standing

in a queue with each one holding basket of candies which contain some number

of candies each (assume this to be the previous state), now distributor thought to

reassign candies to students hence here distributor followed an algorithm where

he gave xi number of candies to the ith student such that xi is summation of all

candies given to the students before ith student in previous state. Write a prolog

program to get updated values of candies with each student after distribution.

Q2.

Assume first student standing in that queue gets same number of candies as he/she got in previous state.

Marks Distribution

  • Question 1:
    3 points for the implementation and 2 for the viva. If student is not able toexplain the implementation part, he/she will fetch 0 in that question.

    (3+2=5)

  • Question 2:3 points for the implementation and 2 for the viva. If student is not able to explain the implementation part, he/she will fetch 0 in that question. (3+2=5)
  • 2021507_Assignment1-jehz3d.zip