# Prolog disjunction and conjunction

Page 1 of 1

## 2 Replies - 1034 Views - Last Post: 19 April 2013 - 12:06 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=318908&amp;s=e2131ad2214aae472cdf051eb2f7d5d4&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 Kunj

Reputation: 0
• Posts: 3
• Joined: 24-February 09

# Prolog disjunction and conjunction

Posted 18 April 2013 - 01:52 PM

Hi,

I am stuck up with an prolog query and I am lost at it.

Define a rule which models graudation, make sure that it is easy to change.

A student can only graduate if he has taken the required courses
Every student Must take 1114 and 1124
A student can take either 2134 or 394
After that a student must take two electives.

Electives are:
991
992
993
494
495

Any help or guide would be appreciated
Thanks

Is This A Good Question/Topic? 0

## Replies To: Prolog disjunction and conjunction

### #2 #define

• Duke of Err

Reputation: 1853
• Posts: 6,671
• Joined: 19-February 09

## Re: Prolog disjunction and conjunction

Posted 18 April 2013 - 08:55 PM

Are you to use lists or are you using a list of facts?

eg

```studies(fred, 1114).
studies(fred, 1124).
studies(fred, 2134).
studies(fred,  993).
```

### #3 Kunj

Reputation: 0
• Posts: 3
• Joined: 24-February 09

## Re: Prolog disjunction and conjunction

Posted 19 April 2013 - 12:06 PM

Thank for help.
Its done