alfredao2000
Technical User
Hey, I am trying to learn prolog but i have few problems. I have some excercises to practice but as i said i have problems with it. Its pretty basic for the specialists but as I said already I am complete beginner.
Ok let me describe my problem:
I have got a database of facts:
bank_income(bank, income)
bank_employees(bank, no_of_employees)
bank_society_1(bank)
bank_society_2(bank)
And now what I need to do is:
1. add up the total income for all of the banks from bank_income(bank, income)
2. show if the entered bank is member of the bank_society_1(bank), bank_society_2(bank),neither or is not a bank.
3. function that displays if the banks are in order of income - bank_income(bank, income)
4. function that displays if the banks are in order of number of employees - bank_employees(bank, no_of_employees).
I hope that you will be able to help me. It will help me to understand it better on working examples, thank you for your time.
Ok let me describe my problem:
I have got a database of facts:
bank_income(bank, income)
bank_employees(bank, no_of_employees)
bank_society_1(bank)
bank_society_2(bank)
And now what I need to do is:
1. add up the total income for all of the banks from bank_income(bank, income)
2. show if the entered bank is member of the bank_society_1(bank), bank_society_2(bank),neither or is not a bank.
3. function that displays if the banks are in order of income - bank_income(bank, income)
4. function that displays if the banks are in order of number of employees - bank_employees(bank, no_of_employees).
I hope that you will be able to help me. It will help me to understand it better on working examples, thank you for your time.