Вы находитесь на странице: 1из 48

FACULTY OF INFORMATION AND COMMUNICATION TECHNOLOGY

BITI1113
Artificial Intelligence
FINAL PROJECT
Std Name Std ID HP No. and E-
DIT: mail

ROSLAN BIN RAHMAT B03081005 0195163299


6
SITI SYAHIDAH BINTI B03081017 0172755373
ALIAS 8

Group No: FATIN FASIHAH BINTI B03081015 0124367662


MOHD MOKHTAR 7

TIEW BOON HAN B03081014 0166726768


1

Group Name:

BITM GROUPS

Supervisor
MISS NUZULHA
Name

Comparison between ethanol, benzaldehyde and


Project Title
propanone

System Name Substance Diagnosis System


CONTENT OF TABLE

FLOW CHART 2-11

CODING LISP 12-15

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?

Orange precipitate is formed Others

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

Question 3 Question 3 Question 3

4
Question 3: What will form when the substance react with Tollen Reagent?

Silver Mirror is
No Reaction Others
formed

Question 4 Question 4 Question 4

5
Question 4: What will form when the substance react with I 2 in NaOH 2 , heating ?

Yellow
precipitate is No Reaction Others
formed

Question 5 Question 5 Question 5

6
Question 5: What will happen when the substance reacts with Acidified KMnO 4 , heat?

is No Reaction Others
decolourised

Question 6 Question 6 Question 6

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

Question 9 Question 9 Question 9

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 "~&~&#### Substance Diagnosis System ####~%")

(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 )~%")

(format t "~&~& ANSWER : ")


12
(let ((a (read)))

(cond ((= a 1)(format t "~&~&~% The possible of substances are ethanal,benzaldeyhde and propanone.~
%~%"))

((/ a 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&2) What will form when the substance react with Fehling's Solution? ( reddish precipitate
= 1 , no reaction = 2 )~%")

(format t "~&~& ANSWER : ")

(let ((b (read)))

(cond ((= b 1)(format t "~&~&~% The possible of substance is ethanal.~%~%"))

((= b 2)(format t "~&~&~% The possible of substances are benzaldeyhde and propanone.~%~%"))

((/ b 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&3) What will form when the substance react with Tollen Reagent? ( silver mirror = 1 , no
reaction = 2 )~%")

(format t "~&~& ANSWER : ")

(let* ((c (read)))

(cond ((= c 1)(format t "~&~&~% The possible of substances are ethanal and benzaldeyhde.~%~%"))

((= c 2)(format t "~&~&~% The possible of substance is propanone.~%~%"))

((/ c 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&4) What will form when the substance react with I2 in NaOH2 , heating ? ( yellow
precipitate,CHI3 = 1 , no reaction = 2 )~%")

(format t "~&~& ANSWER : ")

(let* ((d (read)))

(cond ((= d 1)(format t "~&~&~% The possible of substances are ethanal and propanone.~%~%"))

((= d 2)(format t "~&~&~% The possible of substance is benzaldeyhde.~%~%"))

((/ d 1)(format t "~&~&~% No substance is matched.~%~%")))

13
(format t "~&~&5) What will happen when the substance reacts with Acidified KMnO4, heat?? ( KMn04
is decolourised = 1 , no reaction = 2 )~%")

(format t "~&~& ANSWER : ")

(let* ((e (read)))

(cond ((= e 1)(format t "~&~&~% The possible of substances are ethanal and benzaldeyhde.~%~%"))

((= e 2)(format t "~&~&~% The possible of substance is propanone.~%~%"))

((/ e 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&6) What will happen when the substance reacts with Acidified KMnO4, under reflux?
( KMn04 is decolourised = 1)~%")

(format t "~&~& ANSWER : ")

(let* ((f (read)))

(cond ((= f 1)(format t "~&~&~% The possible of substances are ethanal, benzaldeyhde and propanone.~
%~%"))

((/ f 1)(format t "~&~&~% No substance is matched.~%~%")))

(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 )~%")

(format t "~&~& ANSWER : ")

(let* ((g (read)))

(cond ((= g 1)(format t "~&~&~% The possible of substances are ethanal and benzaldeyhde.~%~%"))

((= g 2)(format t "~&~&~% The possible of substance is propanone.~%~%"))

((/ g 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&8) What will happen when the substance reacts with Air oxidation? ( no reaction = 1 ,
oxidised to benzoic acid = 2 )~%")

(format t "~&~& ANSWER : ")

14
(let* ((h (read)))

(cond ((= h 1)(format t "~&~&~% The possible of substances are ethanal and propanone.~%~%"))

((= h 2)(format t "~&~&~% The possible of substance is benzaldehyhe.~%~%"))

((/ h 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&9) What will form when the substance reacts with HCN? ( Cyanohidrin is formed = 1)~
%")

(format t "~&~& ANSWER : ")

(let* ((i (read)))

(cond ((= i 1)(format t "~&~&~% The possible of substances are ethanal, benzaldehyde and propanone.~
%~%"))

((/ i 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&10)What will produce when the substance reacts with Odour? ( Almond = 1, no reaction
= 2 )~%")

(format t "~&~& ANSWER : ")

(let* ((j (read)))

(cond ((= j 1)(format t "~&~&~% The possible of substance is benzaldehyhe.~%~%"))

((= j 2)(format t "~&~&~% The possible of substances are ethanal and propanone.~%~%"))

((/ j 1)(format t "~&~&~% No substance is matched.~%~%")))

(format t "~&~&******************** RESULT *******************~%~%")

(format t "~&~&-----------Based on the given answer-----------")

(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.~%~%"))

((format t "~&~&~% No substance matched.~%~%"))))))))))))))

This is the example output for our Substance Diagnosis System.

System determines that substance has been classified as ETHANAL.

Step 1: Open Allegro Common Lisp Console

16
Step 2: Type all the coding for the program

17
18
19
Step 3 : Call the function to start the system

Step 4: Answer the question based on instruction for question 1


20
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.

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.

This is the example output for our Substance Diagnosis System.

System determines that substance has been classified as BENZALDEHYDE

Step 1: Open Allegro Common Lisp Console

24
Step 2: Type all the coding for the program

25
26
27
Step 3 : Call the function to start the system

Step 4: Answer the question based on instruction for question 1

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.

This is the example output for our Substance Diagnosis System.

System determines that substance has been classified as PROPANONE

32
Step 1: Open Allegro Common Lisp Console

Step 2: Type all the coding for the program

33
34
35
Step 3 : Call the function to start the system

Step 4: Answer the question based on instruction for question 1

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.

System determines that there is no substance that is matched

Step 1: Open Allegro Common Lisp Console


40
Step 2: Type all the coding for the program

41
42
43
Step 3 : Call the function to start the system

Step 4: Answer the question based on instruction for question 1

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

Вам также может понравиться