我正在嘗試製作一個程序,用戶可以回答問題以查找遊戲,但我無法理解如何使用列表和聲明。我嘗試了另一種程序點系統的方式。該方案是這樣的: yeah:-
write('Please answer the questions to find the game which suite you!'),
nl,
find(Game),
nl,
write('I
我寫了下面的簡單代碼,我期待當我寫'男性'時,這段代碼問我一次「是男性嗎?」如果我輸入'不',它會在屏幕上寫上「她是女性」。 male :- (print('is it male ? '),read(yes)) -> true; asserta(not(male)),female.
female:- not(male),print('she is female').
not(P) :- (ca