Question: Use prolog for the coding Using prolog write a predicate to guess a number interactively from 1 to 100 in at most 4 tries. Output
Use prolog for the coding
Using prolog write a predicate to guess a number interactively from 1 to 100 in at most 4 tries. Output can be obtained with predicates write(X) and nl, and input with predicate read(X) (integer input will be followed by a .). The secret number can be hardcoded.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
