We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Assignment No. 03 Semester: Spring 2014 Modern Programming Languages (CS508) ||| Total Marks: 15 Due Date: 09/07/2013

Assignment No. 03
Semester: Spring 2014
Modern Programming Languages  (CS508)

 

Total Marks: 15

 

Due Date:  09/07/2013

 

Instructions:

Please read the following instructions carefully before submitting assignment:

 

  • You will submit your assignment before or on due date on VU-LMS.
  • Assignment should be completed by your own efforts it should not be copied from internet, handouts or books.
  • You should submit your MS Word File via assignment interface at VU-LMS.
  • Assignment sent via Email will not be replied and accepted/graded in any case.
  • If the submitted assignment does not open or file is corrupt, it will not be graded.
  • You will submit solution only in Microsoft Word File.

 

Objectives:

 

To understand and familiarize with Prolog Language.

 

 

For any query about the assignment, contact at cs508@vu.edu.pk or through MDB.

Assignment Questions

 

Suppose you have the following observational data about students of college.

 

  • Zafar is adult and fasting in Ramzaan Ul Mobarak.
  • Rizwan is adult and fasting in Ramzaan Ul Mobarak.
  • Raza is adult and fasting in Ramzaan Ul Mobarak.

 

  • Imran is non adult but fasting in Ramzaan Ul Mobarak.
  • Saqib is non adult but fasting in Ramzaan Ul Mobarak.

 

  • Nazia is Healthy and Adult and Travelling.
  • Ammara is Healthy and Adult and Travelling.

 

  • Shafiq is Healthy and Adult and Travelling.

.

  • Imran is Healthy and non Adult and Travelling.
  • Raza is Healthy and Adult and Travelling.
  • Bushra is Healthy and not Adult and Travelling.

 

  • Bushra is under age and not fasting in Ramzan Ul Mobarak.
  • Nadia is under age and not fasting in Ramzan Ul Mobarak.

 

  • Shafiq has become ill and not fasting in Ramzan Ul Mobarak.
  • Salaman is above eighty and feeble and not fasting in Ramzan Ul Mobarak.

 

  1. 1.      Now being a prolog programmer answer the following questions:

 

Question # 1                                                                                                                              Marks 5     

 

Write the prolog rules for the followings.

 

If one is fasting in Ramzan ul Mobarak then on is Adult.

If one is Fasting in Ramzan ul Mobarak then one is rewarded by ALLAH KARIM.

If one is non adult and fasting in Ramzan ul Mobarak then one is earning greater reward by Allah Karim.

If one is adult and healthy and travelling then one can keep left fasts in travelling after Ramzan ul Mobarak

If one is ill or of very old age feeble can give ransom for left fasts to needy 

 

Question # 2                                                                                                                              Marks 10     

Write the prolog queries for the followings. These queries will be executed according to the facts and rules defined for the above given data and perform all steps to write the output of the given queries.

 

  1. a.      Is there adult X that can keep left fasts? 
  2. b.      Is there Y that can leave fast?
  3. c.       Who is M that earns greater reward by Allah Karim?
  4. d.      Is Bushra Fasting in Ramzan Ul Mobark?
  5. e.       Are Imran and Saqib keeping fast?
  6. f.       Who is Z adult and fasting?

 

Note: In queries where variables are used along with answer write all the possible matches either they are true or not.

 

 

BEST OF LUCK

 


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 1773

Attachments:

Replies to This Discussion

you are 70% wrong bro

this is not correct, you just have to use variables like X,Y..

in may Rules may kisi ka name nahe mention karna bro

handouts ka page # 79 ghor say parho or then complete karo ho  jay ge

RSS

Latest Activity

+M.Tariq Malik replied to ■ T̲h̲e̲ ̲J̲o̲k̲e̲r̲ ■'s discussion Why Chat is not working anymore?
5 minutes ago
+M.Tariq Malik liked ■ T̲h̲e̲ ̲J̲o̲k̲e̲r̲ ■'s discussion Why Chat is not working anymore?
6 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS101 Assignment 01 Fall 2020 Solution / Discussion in the group CS101 Introduction to Computing
27 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS507 Assignment No 01 Fall 2020 Solution & Discussion Due Date: 25-11-2020 in the group CS507 Information Systems
30 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS615 Assignment No 01 Fall 2020 Solution / Discussion Due Date: 27-10-2020 in the group CS615 Software Project Management
31 minutes ago
■ T̲h̲e̲ ̲J̲o̲k̲e̲r̲ ■ posted a discussion
38 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS202 Assignment 01 Fall 2020 Solution / Discussion in the group CS202 Fundamentals of Front End Development
39 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MTH301 Assignment 01 Fall 2020 Solution / Discussion in the group MTH301 Calculus II
41 minutes ago
+M.Tariq Malik replied to Waseem Aziz's discussion GDB MGT101 - Financial Accounting Friday, November 27, 2020 in the group MGT101 Financial Accounting
45 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS101 Assignment 01 Fall 2020 Solution / Discussion in the group CS101 Introduction to Computing
49 minutes ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MGT211 Online Quiz No 01 Fall 2020 Solution / Discussion in the group MGT211 Introduction To Business
51 minutes ago
Hamza replied to +M.Tariq Malik's discussion CS614 Assignment No 01 Fall 2020 Solution & Discussion Due Date:26-11-2020 in the group CS614 Data Warehousing
58 minutes ago

Looking For Something? Search Here

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.