| | |
Mohamed Shahabudeen in need of help!
Please support our Legacy and Other Languages advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jun 2008
Posts: 5
Reputation:
Solved Threads: 0
Hey this is Mohamed Shahabudeen. Can someone please help me with the following!
Enter the following program called “composers.pro”
% This database is about composers
% Datarecords: composer’s last name, birth and death year
composer (monteverdi, 1567, 1643).
composer (bach, 1685, 1750).
composer (vivaldi, 1678, 1741).
composer (mozart, 1756, 1791).
composer (haydn, 1732, 1809).
composer (beethoven, 1770, 1827).
composer (kreisler, 1875, 1962).
composer (salieri, 1750, 1825).
composer (sammartini, 1700, 1775).
composer (scarlatti, 1660, 1725).
composer (schubert, 1797, 1828).
composer (schumann, 1810, 1856).
composer (tchaikovsky, 1840, 1893).
composer (brahms, 1833, 1897).
composer (verdi, 1813, 1901).
composer (debussy, 1862, 1918).
composer (stravinksy, 1882, 1971).
composer (wagner, 1813, 1883).
composer (chopin, 1810, 1849).
composer (corelli, 1653, 1713).
composer (copland, 1890, 1990).
% composer X is a contemporary of composer Y is the range of years during which they were alive overlap
contemporary (X,Y) :-
composer (X, B1, D1), composer (Y, B2, D2) , X \ = Y, overlap (B1, D1, B2, D2).
overlap (B1, D1, B2, D2). :- B2 >= B1, B2 =< D1.
overlap (B1, D1, B2, D2). :- B1 >= B2, B1 =< D2.
alive_during (Composer, Year) :-
composer (Composer, B1, D1), overlap (B1, D1, Year, Year).
a. Use the program to find all contemporaries of Bach, Verdi, and Copeland.
b. The Baroque era of classical music extends from 1600 to 1750. Write a predicate baroque/1, i.e., executed as baroque(X) where X is a particular name, that determines whether that composer belongs to the baroque era or not.) Prolog will answer “yes” or “no”. The predicate uses the database of composers shown above.
Thank you
Mohamed Shahabudeen
Enter the following program called “composers.pro”
% This database is about composers
% Datarecords: composer’s last name, birth and death year
composer (monteverdi, 1567, 1643).
composer (bach, 1685, 1750).
composer (vivaldi, 1678, 1741).
composer (mozart, 1756, 1791).
composer (haydn, 1732, 1809).
composer (beethoven, 1770, 1827).
composer (kreisler, 1875, 1962).
composer (salieri, 1750, 1825).
composer (sammartini, 1700, 1775).
composer (scarlatti, 1660, 1725).
composer (schubert, 1797, 1828).
composer (schumann, 1810, 1856).
composer (tchaikovsky, 1840, 1893).
composer (brahms, 1833, 1897).
composer (verdi, 1813, 1901).
composer (debussy, 1862, 1918).
composer (stravinksy, 1882, 1971).
composer (wagner, 1813, 1883).
composer (chopin, 1810, 1849).
composer (corelli, 1653, 1713).
composer (copland, 1890, 1990).
% composer X is a contemporary of composer Y is the range of years during which they were alive overlap
contemporary (X,Y) :-
composer (X, B1, D1), composer (Y, B2, D2) , X \ = Y, overlap (B1, D1, B2, D2).
overlap (B1, D1, B2, D2). :- B2 >= B1, B2 =< D1.
overlap (B1, D1, B2, D2). :- B1 >= B2, B1 =< D2.
alive_during (Composer, Year) :-
composer (Composer, B1, D1), overlap (B1, D1, Year, Year).
a. Use the program to find all contemporaries of Bach, Verdi, and Copeland.
b. The Baroque era of classical music extends from 1600 to 1750. Write a predicate baroque/1, i.e., executed as baroque(X) where X is a particular name, that determines whether that composer belongs to the baroque era or not.) Prolog will answer “yes” or “no”. The predicate uses the database of composers shown above.
Thank you
Mohamed Shahabudeen
•
•
Join Date: Jun 2008
Posts: 5
Reputation:
Solved Threads: 0
I Mohamed Shahabudeen will help someone grealtly if he/she helps me solve my Prolog!
0
#5 Jun 5th, 2008
I Mohamed Shahabudeen will help someone grealtly if he/she helps me solve my Prolog problem below!
Enter the following program called “composers.pro”
% This database is about composers
% Datarecords: composer’s last name, birth and death year
composer (monteverdi, 1567, 1643).
composer (bach, 1685, 1750).
composer (vivaldi, 1678, 1741).
composer (mozart, 1756, 1791).
composer (haydn, 1732, 1809).
composer (beethoven, 1770, 1827).
composer (kreisler, 1875, 1962).
composer (salieri, 1750, 1825).
composer (sammartini, 1700, 1775).
composer (scarlatti, 1660, 1725).
composer (schubert, 1797, 1828).
composer (schumann, 1810, 1856).
composer (tchaikovsky, 1840, 1893).
composer (brahms, 1833, 1897).
composer (verdi, 1813, 1901).
composer (debussy, 1862, 1918).
composer (stravinksy, 1882, 1971).
composer (wagner, 1813, 1883).
composer (chopin, 1810, 1849).
composer (corelli, 1653, 1713).
composer (copland, 1890, 1990).
% composer X is a contemporary of composer Y is the range of years during which they were alive overlap
contemporary (X,Y) :-
composer (X, B1, D1), composer (Y, B2, D2) , X \ = Y, overlap (B1, D1, B2, D2).
overlap (B1, D1, B2, D2). :- B2 >= B1, B2 =< D1.
overlap (B1, D1, B2, D2). :- B1 >= B2, B1 =< D2.
alive_during (Composer, Year) :-
composer (Composer, B1, D1), overlap (B1, D1, Year, Year).
a. Use the program to find all contemporaries of Bach, Verdi, and Copeland.
b. The Baroque era of classical music extends from 1600 to 1750. Write a predicate baroque/1, i.e., executed as baroque(X) where X is a particular name, that determines whether that composer belongs to the baroque era or not.) Prolog will answer “yes” or “no”. The predicate uses the database of composers shown above.
Thank you
Mohamed Shahabudeen[/QUOTE]
Enter the following program called “composers.pro”
% This database is about composers
% Datarecords: composer’s last name, birth and death year
composer (monteverdi, 1567, 1643).
composer (bach, 1685, 1750).
composer (vivaldi, 1678, 1741).
composer (mozart, 1756, 1791).
composer (haydn, 1732, 1809).
composer (beethoven, 1770, 1827).
composer (kreisler, 1875, 1962).
composer (salieri, 1750, 1825).
composer (sammartini, 1700, 1775).
composer (scarlatti, 1660, 1725).
composer (schubert, 1797, 1828).
composer (schumann, 1810, 1856).
composer (tchaikovsky, 1840, 1893).
composer (brahms, 1833, 1897).
composer (verdi, 1813, 1901).
composer (debussy, 1862, 1918).
composer (stravinksy, 1882, 1971).
composer (wagner, 1813, 1883).
composer (chopin, 1810, 1849).
composer (corelli, 1653, 1713).
composer (copland, 1890, 1990).
% composer X is a contemporary of composer Y is the range of years during which they were alive overlap
contemporary (X,Y) :-
composer (X, B1, D1), composer (Y, B2, D2) , X \ = Y, overlap (B1, D1, B2, D2).
overlap (B1, D1, B2, D2). :- B2 >= B1, B2 =< D1.
overlap (B1, D1, B2, D2). :- B1 >= B2, B1 =< D2.
alive_during (Composer, Year) :-
composer (Composer, B1, D1), overlap (B1, D1, Year, Year).
a. Use the program to find all contemporaries of Bach, Verdi, and Copeland.
b. The Baroque era of classical music extends from 1600 to 1750. Write a predicate baroque/1, i.e., executed as baroque(X) where X is a particular name, that determines whether that composer belongs to the baroque era or not.) Prolog will answer “yes” or “no”. The predicate uses the database of composers shown above.
Thank you
Mohamed Shahabudeen[/QUOTE]
Instead of just begging someone to write your program for you why don't you try to do it and post what you have done, then ask specific questions about that you don't understand.
And stop posting the same question over and over and over and over ...
And stop posting the same question over and over and over and over ...
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Other Threads in the Legacy and Other Languages Forum
- Previous Thread: Mathematical Logic Question
- Next Thread: QBasic, what can i do to make my programs run without the QBasic program?
| Thread Tools | Search this Thread |






