Advertisement
Luninariel

Python Logic Programming Instructions

Nov 6th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. Use logpy or the logic programming language of your choice to solve the following logic puzzle:
  2.  
  3. http://www.puzzlersparadise.com/onlinelogic/NewOffices.htm (Links to an external site.)
  4.  
  5.  
  6.  
  7. Turn in one source file when you're finished. Make sure it is well documented so that it is clear how you used the logic language to solve the problem (this should be obvious, but don't just hardcode in the solution!).
  8.  
  9. I highly recommend starting with the template (below this assignment on canvas). Using the template, a correct solution should have the following output (the order of the employees within the two seat sets may vary):
  10.  
  11. wall seats:
  12. ('ellen', 'weathervane', 'product manager')
  13. ('curtis', 'radcliffe', 'marketing analyst')
  14. ('steve', 'macklin', 'publications writer')
  15. window seats:
  16. ('harriet', 'fairview', 'applications engineer')
  17. ('amelia', 'singer', 'marketing manager')
  18. ('dick', 'chase', 'product manager')
  19. -----------
  20. number of results: 1
  21.  
  22. If your solution isn't providing this output, you can still receive substantial partial credit, but please make it clear in your comments what is working and what isn't. Ideally, identify what rule isn't being followed in the output produced by your program (turning in an annotated output from your program would be very helpful for me to judge your partial credit).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement