Question: Create a code in Python for the below scenerio We will simulate a care facility where patients arrive with different symptoms. In the application, a
Create a code in Python for the below scenerio
We will simulate a care facility where patients arrive with different symptoms. In the application, a user will be required to provide the number of patients that arrive at the facility. This number will be an integer value between 100 and 1000 patients (input validation). The application will start with the following statement Welcome to the IBM Patients Simulation Test. Internally randomly, each simulated patient will have three symptoms, and they will be defined as a random number between 1 and 10. These numbers have to be dissimilar as symptoms should be different. The program will assign patients to different pathways depending on the next conditions:
(1) If the patient has the symptoms 1 and 2 (in any order), we will evaluate the following: If the remainder symptom is number 3, the pathway for the patient will be pathway T2. If the remainder symptom is number 4, the pathway for the patient will be pathway T3. If any, then the pathway is T4
(2) If the patient has the symptoms 6 and 3 (in any order), we will evaluate the following: If the remainder symptom is number 7, the pathway for the patient will be pathway T2. If the remainder symptom is number 8, the pathway for the patient will be pathway T3. If any, then the pathway is T4
(3) If the patient has the symptoms 5 and 7 (in any order), we will evaluate the following: If the remainder symptom is number 1, the pathway for the patient will be pathway T2. If the remainder symptom is number 9, the pathway for the patient will be pathway T3. If any, then the pathway is T4
(4) If the patient has the symptoms 9 and 10 (in any order), the pathway is T5
(5) For any other combination, the pathway is T1
Because of the special care for pathway T4, it is required to count the number of times T4 is recommended in the simulation.
The output for the user should be the following: The patient # + (str(number) + with symptoms +(str(sym1)) + str(sym2) + str(sym3)) + is recommended the pathway + str(treatpath) The number of times T4 was recommended is + str(T4counter)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
