Project from Fundamentals of Artificial Intelligence university course (2021-2022 academic year)
Assignment No. 33:
Write a program that solves the problem given by the predicate u33(LIN,LOUT), where LIN is the input
integer list and LOUT is an output list containing all elements of the list
LIN, in which all even numbers are converted to odd numbers by subtracting one.
u33_1:- u33([5,-3,4,8,3,1,0,-2], LOUT),write(LOUT).
[5,-3,3,7,3,1,-1,-3]
u33_2:- u33([10,3,1,7],LOUT),write(LOUT).
[9,3,1,7]
u33([],LOUT),write(LOUT).
[]
Solve a problem using ID3 algorithm