I recently started learning the Prolog Language in my college. I really like it, but there are some things our teacher hasn't explained to us. Actually, he told us to find out how this exercise could be done (I must say my knowledge in Prolog is very poor )

"A student of System Engineering has forgotten his class schedule. However, he can remember a few things about it: -The name of his teachers: Mary, Jesus, Phil. -The name of the courses: Logic, Programming, Maths. -The class days: Monday, Wednesday,Thursday

And some other things: -Programming class, taught by Mary, is after the Logic class -Phil does not like to work on Monday, and Monday is a day that Logic is not taught -He also knows that each teacher teaches a single course and classes are held on different days

Would you help this stupid student relate each teacher with their subject and the weekday class it is taught? First answer: (NO, I DONT WANT TO HELP THIS MF)

Second answer: WOULD YOU HELP ME TO HELP THIS GUY??"

Haha, well, I dont want to make this post too long, but here I'll post the things I tried, but without any result

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% FACTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% another way to do it maybe?? %teachers(mary,jesus,phil). %subjects(logic,programming,maths). %days(monday,wednesday,thursday).

This isn't game development related and it's a homework question so this isn't an appropriate forum to ask in. If you don't know how to complete the assignment you should make sure you do any reading you've been given and then ask your professor or classmates for help.