A clinic keeps a record of its patients, the illness of each one and the days the illness lasted. You will sort the patients into acute and chronic cases with a simple rule. Then you will find the patient who was ill the longest and the total days of illness.
The idea. In this lab, an illness that lasts less than days is called acute, and one that lasts days or more is called chronic. Doctors do not use one fixed number of days. The rule is only for practice.
Your tasks.
acute to the list of patient names whose illness lasted less than days, in the order they appear.chronic to the list of names whose illness lasted days or more.longest to the name of the patient who was ill the longest, and total_days to the total days of illness of all the patients.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…