Академический Документы
Профессиональный Документы
Культура Документы
BITI1113
Artificial Intelligence
FINAL PROJECT
Std Name Std ID HP No. and E-
DIT: mail
Group Name:
BITM GROUPS
Supervisor
MISS NUZULHA
Name
PRINT SCREEN
- ETHANAL 16-23
- BENZALDEHYDE 24-31
- PROPANONE 32-39
- OTHER 40-48
2
FLOW CHART
Question 1: What will form when the substance react with 2, 4-dinitrophenylhydrazine?
Question 2 Question 2
3
Question 2: What will form when the substance react with Fehling’s Solution?
Reddish
precipitate is No Reaction Others
formed
4
Question 3: What will form when the substance react with Tollen Reagent?
Silver Mirror is
No Reaction Others
formed
5
Question 4: What will form when the substance react with I 2 in NaOH 2 , heating ?
Yellow
precipitate is No Reaction Others
formed
6
Question 5: What will happen when the substance reacts with Acidified KMnO 4 , heat?
is No Reaction Others
decolourised
7
Question 6: What will happen when the substance reacts with Acidified KMnO 4 , under
reflux?
Is Others
decolourised
Question 7 Question 7
8
QuestionReduced
7: What to
will happen when the substance reacts with H 2 , Ni , temperature 140
Reduced to
°Ϲ ? primary secondary
alcohol Others
Question 8 alcohol 8
Question Question 8
9
Question 8: What will happen when the substance reacts with Air oxidation?
No Reaction Oxidized to
Others
benzoic acid
10
Cyanohidrin
Question 9: What will form when the substance reacts with HCN?
is formed Others
Question 10 Question 10
11
Almond is
Questionformed
10: What will produce when
Nothe substance reacts with Odour?
Reaction Others
Finalend
answer Finalend
answer Final end
answer
CODING FOR THE PROGRAM
(defun project()
(format t "~&~&#### The system is differentiate between ethanol, benzaldehyde and propanone #### ~
%~%")
(format t "~&~&**** MAKE SURE YOU FOLLOW THE INSTRUCTION.GIVE THE ANSWER
FOLLOW THE INSTRUCTION!! **** ~%~%")
(format t "~&~&1) What will form when the substance react with 2, 4-dinitrophenylhydrazine? ( orange
precipitate = 1 )~%")
(cond ((= a 1)(format t "~&~&~% The possible of substances are ethanal,benzaldeyhde and propanone.~
%~%"))
(format t "~&~&2) What will form when the substance react with Fehling's Solution? ( reddish precipitate
= 1 , no reaction = 2 )~%")
((= b 2)(format t "~&~&~% The possible of substances are benzaldeyhde and propanone.~%~%"))
(format t "~&~&3) What will form when the substance react with Tollen Reagent? ( silver mirror = 1 , no
reaction = 2 )~%")
(cond ((= c 1)(format t "~&~&~% The possible of substances are ethanal and benzaldeyhde.~%~%"))
(format t "~&~&4) What will form when the substance react with I2 in NaOH2 , heating ? ( yellow
precipitate,CHI3 = 1 , no reaction = 2 )~%")
(cond ((= d 1)(format t "~&~&~% The possible of substances are ethanal and propanone.~%~%"))
13
(format t "~&~&5) What will happen when the substance reacts with Acidified KMnO4, heat?? ( KMn04
is decolourised = 1 , no reaction = 2 )~%")
(cond ((= e 1)(format t "~&~&~% The possible of substances are ethanal and benzaldeyhde.~%~%"))
(format t "~&~&6) What will happen when the substance reacts with Acidified KMnO4, under reflux?
( KMn04 is decolourised = 1)~%")
(cond ((= f 1)(format t "~&~&~% The possible of substances are ethanal, benzaldeyhde and propanone.~
%~%"))
(format t "~&~&7) What will happen when the substance reacts with H2 , Ni , temperature 140 °C ?
( Reduced to primary alcohol = 1 , Reduced to secondary alcohol = 2 )~%")
(cond ((= g 1)(format t "~&~&~% The possible of substances are ethanal and benzaldeyhde.~%~%"))
(format t "~&~&8) What will happen when the substance reacts with Air oxidation? ( no reaction = 1 ,
oxidised to benzoic acid = 2 )~%")
14
(let* ((h (read)))
(cond ((= h 1)(format t "~&~&~% The possible of substances are ethanal and propanone.~%~%"))
(format t "~&~&9) What will form when the substance reacts with HCN? ( Cyanohidrin is formed = 1)~
%")
(cond ((= i 1)(format t "~&~&~% The possible of substances are ethanal, benzaldehyde and propanone.~
%~%"))
(format t "~&~&10)What will produce when the substance reacts with Odour? ( Almond = 1, no reaction
= 2 )~%")
((= j 2)(format t "~&~&~% The possible of substances are ethanal and propanone.~%~%"))
(cond ((AND (= a 1)(= b 1)(= c 1)(= d 1)(= e 1)(= f 1)(= g 1)(= h 1)(= i 1)(= j 2))(format t "~&~&~%
The substance is ethanal.~%~%"))
((AND (= a 1)(= b 2)(= c 1)(= d 2)(= e 1)(= f 1)(= g 1)(= h 2)(= i 1)(= j 1))(format t "~&~&~% The
substance is benzaldehyde.~%~%"))
15
((AND (= a 1)(= b 2)(= c 2)(= d 1)(= e 2)(= f 1)(= g 2)(= h 1)(= i 1)(= j 2))(format t "~&~&~% The
substance is propanone.~%~%"))
16
Step 2: Type all the coding for the program
17
18
19
Step 3 : Call the function to start the system
Step 6: Possible answer for answer 2 is displayed. Answer the question based on
instruction for question 3.
Step 7: Possible answer for answer 3 is displayed. Answer the question based on
instruction for question 4.
21
Step 8: Possible answer for answer 4 is displayed. Answer the question based on
instruction for question 5.
Step 9: Possible answer for answer 5 is displayed. Answer the question based on
instruction for question 6.
Step 10: Possible answer for answer 6 is displayed. Answer the question based on
instruction for question 7.
22
Step 11: Possible answer for answer 7 is displayed. Answer the question based on
instruction for question 8.
Step 12: Possible answer for answer 8 is displayed. Answer the question based on
instruction for question 9.
Step 13: Possible answer for answer 9 is displayed. Answer the question based on
instruction for question 10.
23
Step 14: The answer for overall based on the user respond is displayed.
24
Step 2: Type all the coding for the program
25
26
27
Step 3 : Call the function to start the system
28
Step 5: Possible answer for answer 1 is displayed. Answer the question based on
instruction for question 2.
Step 6: Possible answer for answer 2 is displayed. Answer the question based on
instruction for question 3.
Step 7: Possible answer for answer 3 is displayed. Answer the question based on
instruction for question 4.
29
Step 8: Possible answer for answer 4 is displayed. Answer the question based on
instruction for question 5.
Step 9: Possible answer for answer 5 is displayed. Answer the question based on
instruction for question 6.
Step 10: Possible answer for answer 6 is displayed. Answer the question based on
instruction for question 7.
30
Step 11: Possible answer for answer 7 is displayed. Answer the question based on
instruction for question 8.
Step 12: Possible answer for answer 8 is displayed. Answer the question based on
instruction for question 9.
Step 13: Possible answer for answer 9 is displayed. Answer the question based on
instruction for question 10.
31
Step 14: The answer for overall based on the user respond is displayed.
32
Step 1: Open Allegro Common Lisp Console
33
34
35
Step 3 : Call the function to start the system
36
Step 5: Possible answer for answer 1 is displayed. Answer the question based on
instruction for question 2.
Step 6: Possible answer for answer 2 is displayed. Answer the question based on
instruction for question 3.
Step 7: Possible answer for answer 3 is displayed. Answer the question based on
instruction for question 4.
Step 8: Possible answer for answer 4 is displayed. Answer the question based on
instruction for question 5.
37
Step 9: Possible answer for answer 5 is displayed. Answer the question based on
instruction for question 6.
Step 10: Possible answer for answer 6 is displayed. Answer the question based on
instruction for question 7.
Step 11: Possible answer for answer 7 is displayed. Answer the question based on
instruction for question 8.
38
Step 12: Possible answer for answer 8 is displayed. Answer the question based on
instruction for question 9.
Step 13: Possible answer for answer 9 is displayed. Answer the question based on
instruction for question 10.
Step 14: The answer for overall based on the user respond is displayed.
39
This is the example output for our Substance Diagnosis System.
41
42
43
Step 3 : Call the function to start the system
44
Step 5: Possible answer for answer 1 is displayed. Answer the question based on
instruction for question 2.
Step 6: Possible answer for answer 2 is displayed. Answer the question based on
instruction for question 3.
Step 7: Possible answer for answer 3 is displayed. Answer the question based on
instruction for question 4.
45
Step 8: Possible answer for answer 4 is displayed. Answer the question based on
instruction for question 5.
Step 9: Possible answer for answer 5 is displayed. Answer the question based on
instruction for question 6.
Step 10: Possible answer for answer 6 is displayed. Answer the question based on
instruction for question 7.
46
Step 11: Possible answer for answer 7 is displayed. Answer the question based on
instruction for question 8.
Step 12: Possible answer for answer 8 is displayed. Answer the question based on
instruction for question 9.
Step 13: Possible answer for answer 9 is displayed. Answer the question based on
instruction for question 10.
47
Step 14: The answer for overall based on the user respond is displayed.
48