We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>


Looking For Something at vustudents.ning.com? Click Here to Search

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

 


+ Click Here To Join also Our facebook study Group.


+ Prohibited Content On Site + Report a violation + Report an Issue


..How to Join Subject Study Groups & Get Helping Material?..


See Your Saved Posts Timeline

Views: 1510

.

+ http://bit.ly/vucodes (Vu Study Groups By Subject Codes Wise)

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

Nasir Mehmood liked areeba khan's profile
3 minutes ago
Zari replied to Zari's discussion Cs401 and cs402
8 minutes ago
Zari replied to Zari's discussion Cs401 and cs402
11 minutes ago
Profile IconMoazzam Ali, Muhammad Rameez, Mazhar Hussain and 6 more joined Virtual University of Pakistan
26 minutes ago
▓▒░Farrukh░▒▓ replied to + M.Tariq Malik's discussion CS403 Assignment No 03 Spring 2019 Solution & Discussion in the group CS403 Database Management Systems
44 minutes ago
+ ! !"AS" liked + ! !"AS"'s discussion Kabhi Kabhi Insan ...
1 hour ago
+ ՏhehαrZααD + replied to + + +SaLAr SiKaNDer's discussion wo tere naseeb ki baarish❤️
1 hour ago
+ !!! Tooba !!! + updated their profile
1 hour ago

Study Corner For DigiSkills Students

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

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