Git Product home page Git Product logo

simpleprologprojecs's Introduction

Two Simple Prolog Projects.

Suko

Every day, The Times newspaper publishes a Suko puzzle. Readers are challenged to place the digits 1 to 9 in the cells of a grid so that numbers in four white circles are the sums of the digits in the cells surrounding them, and the numbers in the three coloured circles are the sums of the digits in the cells of the same colour. Suko 3566 of Thursday 12th August 2022, and its solution are shown in Figure 1.

image

sample input and output:

Input: suko( 15, 14, 26, 23 , [0,1,2,3], 16 , [4,6,7], 17 , [5,8], 12 , GRID ).

Output: GRID = [1, 2, 4, 9, 3, 5, 6, 8, 7]

The Bearings’ Trait

At Teaser Tor trig. point I found a geocaching box. The three-figure compass bearings (bearing 000 = north, 090 = east, etc.) from there to the church spires at Ayton, Beeton and Seaton were needed to decode the clue to the next location. Each spire lay in a different compass quadrant (eg. 000 to 090 [sic] is the North-East quadrant). Curiously, each of the numerals 1 to 9 occurred in these bearings and none of the bearings were prime values. Given the above, if you chose one village at random to be told only its church spire’s bearing, it might be that you could not calculate the other two bearings with certainty, but it would be more likely that you could. Give the three bearings in ascending order.

sample input and output:

Input: acceptable( 169, 247, 358 )

Output: true

simpleprologprojecs's People

Contributors

daviddivellla avatar githubrealfan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.