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

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.

  [Latest Education News]    [All Latest Admissions]    [All Latest Jobs]    [All Latest Scholarships]

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

 

+ How to Follow the New Added Discussions at Your Mail Address?

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

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1714

.

+ 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)

Attachments:

Replies to This Discussion

Assalam u alaikum

Phele se ye hai k Prolog programming hoti hai is ko parho ye logic programming hoti hai abi deaki hai Assignment easy lag rahi hai ho jay ge google kiya kro bacho 

yar kisi nay ki hay to please share kar day ......... 

too much confusion.... 

please tell me that correct or wrong????????

Question no 2

 

 

?-leave(Y,fast),leave(Y,fast).

Y=Bushra

Y=Nadia

?-earns(M,by Allah Karim), earns(M,by Allah Karim).

M=Imran

M=Saqib

?-Fasting(Bushra, Ramdan ul mobark)

No

?-fast(imran&saqib)

Yes

?-keep left(X,fasts)

No

Please Share Question One (1) with thanks.... Whats are rules?

Hn g bacho First Q easy hai both itna muskil ni hai

Zafar is adult and fasting in Ramzaan Ul Mobarak

Fasting(Zafar,Ramzaan Ul Mobarak)

bacho tora google kiya kro

sound mixer is me adult ka koi zikar nahi... what u say about it?

adult hai he galt ana he ni online gammer mai jaa kr sentence past kro then result deako 

plz guyZ help.....................

hi.share the link of online grammer

kuj to help karo zalimo......

yup in ko khud ni ata bas jese  b kar liya or dosron ko confusion k liye kuch b likh diya. kabi koi link ka kahe ga or kabi koi einstein ban jaye ga :/

friends please can change it. quesiton no 1 hay.

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

Adult(zafar):-fasting(zafar,ramzan-ul-mubark),fasting(rizwan,ramzan-ul-mubark).

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

rewarded(zafar):-is(zafar,fasting),is(rizwan,fasting),is(raza,fasting),is(imran,fasting),is(saqib,fasting).

 

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

earning greater reward(imran):-is(imran,fasting),is(saqib,fasting).

RSS

Latest Activity

Profile IconAneela Gul, Amir murad, isha and 7 more joined Virtual University of Pakistan
18 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion GOVERNMENT COLLEGE WOMEN UNIVERSITY FAISALABAD Admission
19 minutes ago
+M.Tariq Malik posted discussions
19 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion THE UNIVERSITY OF AGRICULTURE, PESHAWAR ADMISSION NOTICE (Fall Semester 2020)
21 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion THE UNIVERSITY OF AGRICULTURE, PESHAWAR-PAKISTAN DIRECTORATE OF ADVANCED STUDIES AND RESEARCH ADMISSION NOTICE (Fall Semester 2020)
25 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion Noor School & College Mansehra Admissions 2020
28 minutes ago
Mani Siddiqui BS VIII posted a status
"اس کی آنکھیں دیکھنے والو تم پر واجب ہے شکر کرو اس دنیا میں کچھ اچھا دیکھ لیا"
1 hour ago
+M.Tariq Malik liked +Shakeel Ahmad's discussion You Tube Channel
1 hour ago
Muhammad RaZa liked Awais's discussion درس توحید
1 hour ago
Awais posted discussions
1 hour ago
+M.Tariq Malik liked Shoaib Cheema's discussion Digital Logic and design (CS302) Short Lectures for paper preparation
1 hour ago
+M.Tariq Malik liked + Faisal +'s discussion CS304 Assignment No. 3 Spring 2020 Complete Solution by VU ACADEMY
1 hour ago

Today Top Members 

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

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

.