In this problem, you should write one function named most_common_sickness
.
This function should accept one parameter, which you can assume will be a name of a file with sickness info in it.
The file will have exactly three lines, with one number per-line.
The first line represents the number of Coronaviris cases, the second line the number of flu cases, and the third the number of (common) cold cases.
The program should read in these three lines, and determine which sickness is the most common, or if there is a tie.
The function does not need to return anything, just print out a string.
For instance, if the function was passed in the file name sickness.txt
, and it’s contents were:
300
2100
500
Then the function should print out.
Flu most common
The function should always print out one of four possible strings.
Either Coronavirus most common
, Flu most common
, Cold most common
, or There's a tie!
.
Make sure to include only the one function in your file.
The gradescope tests will call the functions to test them.
Name the program prep20.py
.
Make sure that gradescope gives you the points for passing the test case.