Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python program to use nested elif Document1 Word Part 2: Expert system One of the earliest forms of artificial intelligence (AI) were expert systems. An

image text in transcribed
image text in transcribed
image text in transcribed
python program to use nested elif
Document1 Word Part 2: Expert system One of the earliest forms of artificial intelligence (AI) were expert systems. An expert system is a system designed to make decisions or arrive at diagnoses based on information it is given. The decisions it makes are based on a sequence of conditionals. PEPE A fever diagnosis system For this exercise, you will create an expert system to diagnose the cause of a fever. You will use the input function to interview a patient about their symptoms. Look at the image below to see how the symptoms are associated with various possible causes. Your program should ask the pertinent questions and direct the diagnosis as indi- cated by the chart. Note that there are many case more than one condition can lead to the same diagnosis. Try to write your program to be as concise as possible, and avoid duplicating code as much as you can. of nested conditionals and there are some cases where ere to search DELL Delete Priscr Backsoce & 24 %23 H. PgUp Ctri Alt Alt Documentt - Word Are you shot of breath or wheeng or coughing up phieogm? Possibtes ncde preumoniaoecton Yes Are you coughing? Yes No No its Do you have a Do you havea headache? Yes Possbes inclde val tection headache? stem De you have ahing benes or aching joints A eperiencing Possbtes inde vi intection any of the tolowing pain when bending your head torward nses or vomang bright ght hurting your eys, dowinesa or contusiont le (PEP8) Yes Trafientinmation letp es De you havearh Yes No Possies incude menigs De you have asoe throat Yes Pose ncuea roat tection Ne Do you ha b atabove the wi wth chand ever? Are you vomng or ha darteat Psse inc ey lecten V Possbites include dpestve at ntecon Do yau he pain unnating or are wing ore tent Posibtes ne wary tieon Hee you spent the dty in the sunain he condon Posbites uarke heathton Iuicent omaton t po en Focus re to search DELL Home PrtScr Insert F12 FIO F7 F8 FS FG F3 F2 & 23 8. Donmentt- Word Imagelexercise from Java: Programming Design by James Cohoon and Jack Davidson Functions Results Portions of this exercise may help to further understand the motivation to define functions. Are there places where you would be forced to type the same code more than once? Use functions to minimize repeated code. Call the function in the place where the code needs to s system destyle PEP execute. Style Guide Please familiarize yourself with the PEP 8 Python Style guide. These are excellent tips for writing clear Python code and you should follow this style. Before you submit your assignment, go through the checklist below and make sure your code conforms to the style guide. No unused variables or commented-out code is left in the class Your code is appropriately commented All numbers have been replaced with constants (i.e. no "magic numbers"). Proper capitalization of any names used: snake_case for ordinary variables and func- tions, CapWords for class names, and ALL CAPS for constants 1154 AM here to search DELL Delete PYSer ert 19 Backspe %23 8. R. K. H. Document1 Word Part 2: Expert system One of the earliest forms of artificial intelligence (AI) were expert systems. An expert system is a system designed to make decisions or arrive at diagnoses based on information it is given. The decisions it makes are based on a sequence of conditionals. PEPE A fever diagnosis system For this exercise, you will create an expert system to diagnose the cause of a fever. You will use the input function to interview a patient about their symptoms. Look at the image below to see how the symptoms are associated with various possible causes. Your program should ask the pertinent questions and direct the diagnosis as indi- cated by the chart. Note that there are many case more than one condition can lead to the same diagnosis. Try to write your program to be as concise as possible, and avoid duplicating code as much as you can. of nested conditionals and there are some cases where ere to search DELL Delete Priscr Backsoce & 24 %23 H. PgUp Ctri Alt Alt Documentt - Word Are you shot of breath or wheeng or coughing up phieogm? Possibtes ncde preumoniaoecton Yes Are you coughing? Yes No No its Do you have a Do you havea headache? Yes Possbes inclde val tection headache? stem De you have ahing benes or aching joints A eperiencing Possbtes inde vi intection any of the tolowing pain when bending your head torward nses or vomang bright ght hurting your eys, dowinesa or contusiont le (PEP8) Yes Trafientinmation letp es De you havearh Yes No Possies incude menigs De you have asoe throat Yes Pose ncuea roat tection Ne Do you ha b atabove the wi wth chand ever? Are you vomng or ha darteat Psse inc ey lecten V Possbites include dpestve at ntecon Do yau he pain unnating or are wing ore tent Posibtes ne wary tieon Hee you spent the dty in the sunain he condon Posbites uarke heathton Iuicent omaton t po en Focus re to search DELL Home PrtScr Insert F12 FIO F7 F8 FS FG F3 F2 & 23 8. Donmentt- Word Imagelexercise from Java: Programming Design by James Cohoon and Jack Davidson Functions Results Portions of this exercise may help to further understand the motivation to define functions. Are there places where you would be forced to type the same code more than once? Use functions to minimize repeated code. Call the function in the place where the code needs to s system destyle PEP execute. Style Guide Please familiarize yourself with the PEP 8 Python Style guide. These are excellent tips for writing clear Python code and you should follow this style. Before you submit your assignment, go through the checklist below and make sure your code conforms to the style guide. No unused variables or commented-out code is left in the class Your code is appropriately commented All numbers have been replaced with constants (i.e. no "magic numbers"). Proper capitalization of any names used: snake_case for ordinary variables and func- tions, CapWords for class names, and ALL CAPS for constants 1154 AM here to search DELL Delete PYSer ert 19 Backspe %23 8. R. K. H

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions